Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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 am wanting to have network resources available for all users (not root). I know how to mount them with the mount command, and also have aliases to mount certain drives.
How can I configure linux to mount these drives when a used logs on (or whenever...machine startup...whatever)? I am sure that there is some file that I can put the mount commands in, that is only accessible as root. Right?
well, if you r talking about mounting other "WINDOWS" drives, then I hope wt i'm going to say would b any help to you, but i've read something in a little book about that... i used it to mount the C: drive on windows....
# 1st, make a directory to mount into, as u may know, for example (a directory called WINDOWS)
mkdir /mnt/ windows
# then type this..
gedit /etc/fstab
#inside the "fstab" file, change "dev/hda1" with
/dev/hda1 /mnt/windows vfat auto,umask=0 0 0
i think that if u don't c "dev/hda1" in fstab, then may b u have to mount it 1st.
What you could do is add a command to the user's ~/.profile that is only read-writable by root but can be executed by group or global (chmod 711.) Then in the shell script that gets ran, have it mount the drives/shares needed.
Also, to avoid arbitrary running of this script by anyone, you could make it only group executable (chmod 710) and put the authorized users in that group.
OR
Have the script call out 'who' and match the results against an access list of people allowed to run it.
Let me know if this helps you or just confuses you more.
I think you might be able to help me out with something simliar:
I have an SATA drive with 5 partitions which i would like to be able to mount automatically at start-up.
Unfortunately, I cannot seem to make it work in the usual way through the fstab 'auto' option. I believe this is something to do with the order in which grub looks at things, but i have absolutely no idea if i'm being totally honest.
What i can do perfectly easily, however, is mount each partition by hand at the command line. This, of couse, is a total pain in the butt for more than 1 partition, especially considering that i want to be able to hit the power button on the pc and not have to have any further interaction with the computer, other than accessing files stored on the SATA disk via a samba network.
can you give me any advice as to how to edit my start-up profile so that the simple commands 'mount /dev/sda*' (* = 1,5,6,8 or 9) are executed (as root) when i log in ?
Check /etc/fstab and post it in your reply. I am thinking that most likely the SATA mountpoints are not in the file. 'fstab' gets automatically called upon runlevel/bootup, so it should mount whatever is in this /etc/fstab file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.