mount_command
I can't mount anything without being root.
I want to use mount command as a simple user...how can I make mount with simple user? |
Use "user" and probably also "noauto" as (additional) mount options for that device. Look at "man mount" for implications about using "user".
|
By default, entries in /etc/fstab are set to nouser. This means only root can mount them. To mount as a regular user you need to edit this file. Login as root, then edit the fourth column of the relevant entry in /etc/fstab to read user instead of nouser. This file is re-read upon startup so after editing you either have to restart to have the amendments take affect or else you can reload fstab with the mount -a command.
|
Test please ignore
Test, please ignore
|
Quote:
Quote:
/dev/hda1 /mnt/windows ntfs ro,users,nls=iso8859-15,uid=1000,gid=100,noauto 0 0 (should be on a single line) ro means "read-only" users means "ordinary users can mount the filesystem" nls=... "for the encoding in the filenames" uid=1000,gid=100 to make the file on the windows partition belonging to me (I have the uid 1000 and the gid 100 corresponding to the group "user" noauto "Do not mount the filesystem automatically, only when requested" If you want to mount arbitrary filesystem as an ordinary user, you will have to configure sudo (a good introduction to sudo can be found on: http://www.gentoo.org/doc/en/sudo-guide.xml). But be aware that a clever user having the possibility to issue arbitrary mount command could use it to become root, even if you ensure that a users can only mount a filesystem he owns (a way to do this would be to create a file containing a ext2 filesytem with some of the files in it having the suid and then mount this filesystem) |
what if system auto-mounts
If the volume gets mounted auto-magically, the user could get the data without having to mount the fs at all?
perhaps the hotmnt project from sourceforge.net could be usefull? |
Quote:
Are you aware of what you said there? |
I've changed my fstab entry for /mntcdrom to 'noauto,user,umask=0', and I still can't mount unless root. I've never bothered in the past, but it would be nice.
|
Quote:
|
I think it should work with either option. I've tried 'users' as well.
|
It does work, but not with the command I used to use. 'mount /mnt/cdrom' is ok, 'mount /dev/cdrom /mnt/cdrom' isn't. Thanks anyway.
|
Don't byte me please :)
Quote:
This did't work very well in the past:tisk: , that is why I wrote an tool by my self (had to go thru the whole nightmare of:study: mounting, scripting, learning, fidling, testing...) and that all because *real* user are lazy typers and hate to type mount /mnt/cdrom any time a new cd is inserted and even more hate to type umount /mnt/cdrom... You know: User != Admin not even for extremly large values of User :) |
All times are GMT -5. The time now is 11:10 PM. |