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.