[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2007-03-20
5
Medium Priority
?
389 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 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month19 days, 21 hours left to enroll

872 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