Link to home
Start Free TrialLog in
Avatar of gerhardub
gerhardub

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gerhardub
gerhardub

ASKER

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...
> 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
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?
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.