Solved

How to AutoFS a group folder under /home ????

Posted on 2007-03-20
5
350 Views
Last Modified: 2013-12-16
Howdy!

I've got a simple question for a few of you Linux gods out there:

I'm doing a simple NFS share off a Fedora Core 6 based Linux file server.

My /etc/exports currently looks like this:

/home *(rw,sync)
/home/group *(rw,sync)

I've created two autofs files called auto.home and auto.group:

auto.home has one line:

*  -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid,tcp  lfs1:/home:&

auto.group has one line:

*  -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid,tcp  lfs1:/home/group

My auto.master is the typical default one with:

/misc /etc/auto.misc
/net -hosts
/home /etc/auto.home --timeout 600
/group /etc/auto.group --timeout 600
+auto.master

The UIDs and GIDs are the same on all systems.

On the file server, I have one 800GB /home mount that is where all the home directories are mounted.

Under that mount, I have group folder, and I'd like to NFS share out that group folder to users with the proper GUIDs...

When I start the client's autofs, I don't get any errors... but I also can't see the folders in the group mount.

What am I doing wrong?

Moreover, what is the proper procedure for sharing group folders?

FYI: I've setup the /home/group folder with an overall GUID "GroupUsers" and then set up easy special user group as "Group1" "Group2" etc...  All users that should have group access belong to the "GroupUsers" group, and then also ahve specific other groups as well.

Thanks in advance!

Gerhard
0
Comment
Question by:gerhardub
  • 3
  • 2
5 Comments
 
LVL 38

Accepted Solution

by:
wesly_chen earned 500 total points
ID: 18767575
> auto.home has one line:
> *  -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid,tcp  lfs1:/home:&
change to
*  lfs1:/home/&

change (take out -timeouot=600)
---- /etc/auto.master ----
/misc /etc/auto.misc
/net -hosts
/home /etc/auto.home
/group /etc/auto.group
+auto.master
---------

change /etc/sysconfig/autofs
----
LOCALOPTIONS="soft,intr,rsize=32768,wsize=32768,nosuid,tcp"
DAEMONOPTIONS="--timeout=600"
-----

auto.group has one line:
*  lfs1:/home/group/&
0
 
LVL 1

Author Comment

by:gerhardub
ID: 18767638
Cool... I'll try this too.

Question for you:

What does the & specifically mean in the lfs1:/home/group/& and so on?

I thought it referenced to the user's ID... but now I'm a tad confused...
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 18767716
> What does the & specifically mean in the lfs1:/home/group/& and so on?
so it mounts /group/groupA when you type "cd /group/groupA", not mounts /group/groupB
0
 
LVL 1

Author Comment

by:gerhardub
ID: 18768290
Well,

That didn't exactly work...

What I've got on the lsf1 NFS server is Fiber SAN under VMware that is running a Fedora Core 6 32bit linux system with an 800GB partition mounted as /home on that "server."

So under /home on the lfs1 server is:

<user1>
<user2>
<user3>
<user4>
...
<group>
              <group folder 1>
              <group folder 2>
              <group folder 3>
              ...

...and so on.

What I want to have happen is the group folder be auto mounted like the home directory, but I want users that belong to the group to be able to see and access the version group folders.

Currently, when I attempt to have the "auto.group" autofs mount, I don't see of the subfolders in the group folder.

What should I be doing to achieve this?
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 18768360
As I mentioned, you need to either do "cd /group/group1" or "ls -al /group/group1" to trigger the autofs to mount /group/group1, otherwise, you won't see anything from "ls -al /group".

/group is different than /home directory during login because it requires to "cd /home/user1" when user1 login. But not for /group/group1.

You can put a line:
---------
ls -al /group/`id -gn`
---------
in /etc/bashrc (assume the default shell for user is bash).
to trigger mount /group/group1 while login.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now