Re: mount -o remount,rw as user

2009-09-06 Thread Mirco Piccin
HI,

 On a mostly Etch system with this line in /etc/fstab
/dev/hda5 /dmsdos   defaults,rw,user,umask=0001  0 0
 user mike can mount the partition and write to it but not remount it
 read only in any way I can discover.

to make the partition mounted readonly, simply change rw (read write) to ro
(read only) in the fstab row:
   /dev/hda5 /dmsdos   defaults,ro,users,umask=0001 0 0

 mike@/deb40:~ mount -o remount,ro /d
 mount: only root can do that

for this issue you can use sudo (for more info: # man sudoers).
For example, your sudoers file could be:

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaultsenv_reset

# Host alias specification

# User alias specification

# Cmnd alias specification
Cmnd_AliasMOUNT = /bin/mount
Cmnd_AliasUMOUNT = /bin/umount

# User privilege specification
rootALL=(ALL) ALL

# Uncomment to allow members of group sudo to not need a password
# (Note that later entries override this, so you might need to move
# it further down)
# %sudo ALL=NOPASSWD: ALL

mike ALL = NOPASSWD: MOUNT, UMOUNT



But in this case mike will be able to use mount for any partition.

Hope this helps you.


Re: mount -o remount,rw as user

2009-09-06 Thread Mike McClain
On Sun, Sep 06, 2009 at 10:40:48AM +0200, Mirco Piccin wrote:
 HI,
 
  mike@/deb40:~ mount -o remount,ro /d
  mount: only root can do that
 
 for this issue you can use sudo (for more info: # man sudoers).
 Hope this helps you.

Big help, thanks Mirco.
Is there any other way to give mike the ability to change ro/rw?

Thanks,
Mike


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org