Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a Red Hat AS 4 Server and I'm trying to mount a network share on a Red Hat Linux 5 Server. I've successfully gotten network mount of a share working however, I can only mount the share when I log-on with the root userid.
What I want to do is mount the network drive available to any user that signs-on . I've placed the mount in "fstab" however, it doesn't work because the filesystem is mounted before networking devices are started. Which means that I get a mount error at systems startup because the network is not available.
So my question is how do I mount the network drive and may make the drive available to all of those that log-on?
That's just the answer that I've been looking for. Hoever, I do have a question.
How will users see the network drive under ther userid or will they? What I mean is under there "home" directory or will they have to go up one level to use it?
How to I make it available to them under there "home" directory? I'm currently reading about it on the internet to beter understand how it works and how to configure it to accomplish what I want.
Your information is what I've been looking for. I'm new to the Linux environment comming from Windows.
well a /home partition can live absolutely anywhere, there's nothing inherently special about it. if you mount a posix compliant file ssytem (ie.. a unix one like ext3 or nfs) then any local user with the same uid and or gid as a file on that new filesystem can use it, irrelevant of where it is etc... so as long as the user logged into the client machine has a uid and such like in line with the ownership of their own /home/user directory you're good to go. often ldap is used to centralize the user accounts as well as the users data for simplicity.
There's one part that I'm msssin here? When mounting a network file system ou must have a mount point/directory on the workstation. Since user home directories have the format of "/home/user". How do I make is available to the user community inf the format of '/home/user/network share" for each user?
so you don't want it to be the entire share, just a subdirectory? i would suggest using a symlink to map "/home/user/networkshare -> /var/networkshare/user" . this could be provided via a check and command in a central file, /etc/profile or similar...
That means then that I would have to peform the mounting of the network share first. Then apply a script in the "/etc/profile" that would apply the user name/home directory to the share. Am i on the right track?
Meaning that when a user does a "cd" or "clicks" on the sub-directory that contains there files the system would first mount the shared network drive and then allow the "cd" to take place.
well with autofs the mounting is automatic and implicit. if a user clicks on an icon for /home/user/networkshare then that links to /var/networkshare/user. if that is not currently mounted then it will be mounted automatically and maybe after a 1 to 2 second delay on the first use, it is mounted and everything carries on as normal. note that there's only one single mount done for all users on a single system. the /etc/profile thing is just a way to ensure that the structure you asked for is set up correctly. if you're in a gnome / kde world, you could do somethign else like put a script on the desktop which they double click to open the folder, which just directly uses /var/networkshare/$(whoami) with no constant checking for links. in theory the suggest above for the symlink would only ever be actually executed once, the first time they ever log in. and if they were to delete the link manually of course.
Last edited by acid_kewpie; 07-24-2007 at 02:46 PM.
I seem to having some problems getting autofs to work. Please find below a copy of my "auto.master" and "net.share" both ar located under "/etc"
"auto.master" content:
#
# $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
I've stopped and re-started the autofs with no issues. When I do a cd on "/home/users" I should see a directory but instead I see nothing. I have "users" as a sub-directory under "/home" i.e. "/home/users"
Can you tell what might mbe wrong. Are there any logs to help me determine what is wrong?
not that familiar with troubleshooting autofs to be honest. have you tried just using the standard auto.net (?) file for generic nfs mounts? can you reach the remove server at /net/ip.ad.dr.ess/disk1/Shared_Directories?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.