3 mount questions
hey!
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? this is my /etc/fstab: Code:
/dev/hda10 swap swap defaults 0 0 |
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 that gives normal and of course root full access to the drive to write, read, mount, etc ... |
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. |
thanks for answers guys.
/dev/sda1 /mnt/flash vfat user,rw,umask=000,auto,exec 0 0 this line is for an usb flash disk. Even if it is not pluggeed on boot time i can't mount it as user. Code:
mount: only root can do that |
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 . checkout the manpage an on mount |
thanks!
but the main problem is: users cant mount. |
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 Code:
john ALL=(root) mount 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 Code:
john ALL=(root) ALL,!su,!/bin/sh to use the commands and execute them as root: Code:
john@whatever# sudo mount -t whatever /dev/whatever /mnt/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. |
All times are GMT -5. The time now is 03:00 PM. |