Unable to get "autofs" working on RHEL 5
I'm trying to use autofs to have a network file share that is located on a Red Hat Linux 4 AS server to be mount on a Red Hat Enterprise 5 workstation.
I configured the “/etc/auto.master” file with the mount point on the workstation and the location of the map file. Please find below:
#
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
/misc /etc/auto.misc
/net -hosts
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
#/.autofs /etc/auto.misc --timeout 60
#Mount SERVERA network shares
/home/users /etc/servera.share --timeout 60
The map file is as follows:
#Mount SERVERA network shares
users -fstype=nfs,soft,rw “IP Address=333.444.22.1:disk1/Shared_Directories
I stop and start “autofs” as follows:
/etc/rc.d/init.d/autofs stop (Stop autofs)
/etc/rc.d/init.d/autofs start (Start autofs)
All of this is performed using “root”. After starting “autofs” I can see the mount of “users” in the “/home” directory. However, I'm unable to create files or directories under “users”. I should be able to create files and directories there because the permissions has “root” as the owner. But when I attempt to create anything I get a permission denied message.
In the map file I have an IP address instead of the server name. This because at this time I do have “DNS” established. Could this be part of the problem?
I know the “export” from the server is working because I can perform a mount of the network share and I'm able to perform any task that I choose. This tells me that the “export” is working and I'm using the IP Address to access it. I also have a sub-directory created on the share network drive that I'm able to view also. So at this time I'm confident that the “export” of the network share is working.
When I run “autofs” I can see the share created under “/home” and as I said earlier I'm unable to make any changes within the sub-directory even thou I'm/”root” is the owner. Secondly I'm unable to see at all the sub-directory that is located within the network share. When I invoke the following command: “ls -all /home/users” I see nothing but “.” and “. .” listed.
I've included a copy of the list command below:
[root@localhost /]# ls -all /home
total 32
drwxr-xr-x 5 root root 4096 Jul 26 16:04 .
drwxr-xr-x 25 root root 4096 Jul 26 16:04 ..
drwx------ 3 jimbo jimbo 4096 Jul 23 09:33 jimbo
drwx------ 19 sally sally 4096 Jul 25 06:24 sally
drwxr-xr-x 2 root root 0 Jul 26 16:04 users
I'm of the opinion that even thou the share is being created on the workstation i.e “/home/users”. It is not picking up the share from the file server. The following file is the contents of the map file:
#Mount SERVERA network shares
users -fstype=nfs,soft,rw IP Address=333.444.11.6:/disk1/Shared_Directories
Could it be that “autofs” dose work when using IP addresses vs server name? The mount works with no problems. i.e. “mount -t nfs 333.444.11.6:/disk1/Shared_Directories /home/users”
Can anyone shed some light on what I did wrong or what could be happing.
Once a I get this to work I want users to be able to auto mount the network share and have a sub-directory that has the same name as there home directory i.e. “/home/user/john”. This would allow “john” to create files and directories under “john”.
Thanks
|