Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
well, i have all my disc units and partitions set at /etc/fstab as i wish.
but i have 3 questions:
1) every time i start the system i have new mount point: /mnt/idedisk to an FAT partition which i DONT want to mount. how can i disable this "automount" feature? (i already removed the entry from fstab but when i restarts its back there
2) what should i put into umask parameter on fstab to users get full access for all mounted fat32 units?
3) how do i give user permissions to mount/umount units?
1) log in as root and just delete that line with an editor of choice?
if your unsure how to use the editor then i don't understand why
you cannot delete it ..
2 & 3)
Code:
/dev/hdg1 /mnt/80gig vfat user,rw,umask=000 1 0
thats an example of a drive i have.
that gives normal and of course root full access to the drive
to write, read, mount, etc ...
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315
Rep:
put the word "noauto" before the word "user" in the line for the drive in fstab.
Now you can mount it as user and the system won't automount it on boot.
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315
Rep:
Only thing I see quiet strange is that you have /dev/sd1 listed to be mounted at 2 different places.
so what are you tying when you want to mount
typing mount /dev/sd1 would be confusing for mount and might barf (or mount the first entry I am not sure)
For testing the mount .. comment out the second line with /dev/sd1
you can try a few tings .. try
mount -a (should mount all auto maked devices)
check out what file system this flash device is .. are you sure it's Vfat ?
put it as auto in the fstab and see if that works.
it's a good idea to leave it as auto rather than a specific filesystem, unless it's a fixed device .
Only root can mount drives, even if you can set permissions for users to use those drives after they are mounted.
If you want to allow users to mount drives, they have to do it as root--sudo is the best way.
Code:
root@whatever# visudo
Vi will come up with the sudoers file. edit the file in the following manner:
Code:
john ALL=(root) mount
"john" is the username, "ALL" is the computer (You can use the computer, or ALL. ALL is used for all computers on a network) "(root)" is the username the command is executed as. "mount" is the command executed.
This means: John is allowed to execute the command "mount" as the user root, on all computer on the network.
If you want john to be able to use umount also, you would add this:
Code:
john ALL=(root) mount,umount
Add any commands to that line just by adding comma, use can also use ! to say "not this command" like:
Code:
john ALL=(root) ALL,!su,!/bin/sh
So john can run anything as root, except su, and sh. (Although he could probably run bash as root...)
to use the commands and execute them as root:
Code:
john@whatever# sudo mount -t whatever /dev/whatever /mnt/whatever
john@whatever#
To add to the /etc/sudoers information, just look at the end of the file:
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
If you uncomment the second to the last line, this will give users the ability to use the mount and umount command when working with the cdrom.
You may want to read through the 'info sudoers' pages. You can set whether someone authenticates with there own password or the root password. The latter is better because then only one person needs the root password.
To add to the /etc/sudoers information, just look at the end of the file:
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
If you uncomment the second to the last line, this will give users the ability to use the mount and umount command when working with the cdrom.
You may want to read through the 'info sudoers' pages. You can set whether someone authenticates with there own password or the root password. The latter is better because then only one person needs the root password.
Another thing, on systems with more than one administrator, sudo can also help by logging who used sudo and when.
This can help if someone made changes that you need to track down. i.e. , you know who to ask.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.