Re: How to make mount command mount partions as user not only as root ?



On Thu, 15 May 2008, =SERGE= wrote:

hello

Thak you for your replies

well, i know that i can use fstab etc but Why cant' I pass params to mount
command directly? Mount command reads what is written in fstab, does it not?
Exacly in this way it should read the params i set should it not?

I vaguely remember that there was a way of doing it... by changing chmod +s
for mount

Read the man page for mount:
"Normally, only the superuser can mount file systems. However,
when fstab contains the user option on a line, anybody can mount
the corresponding system."

The mount command is written in such a way that it's aware of who
is running it, and will only allow full use of the options if it's
run as root.

But since users may need to mount things at times, that is allowed
for, but only under controlled situations. Thus if fstab has
been configured to allow it, it can happen. Since only root can
edit fstab, the system administrator can control what the user
can mount, and where it can be mounted.

If anyone could run root any way they wish, then someone could
copy /etc to something mountable, edit things to their liking,
and then mount it over the existing /etc Whammo, they get control
of the system.

But mount doesn't allow that, so the user can only mount that copy
of /etc to somewhere specified by the administrator in fstab.

The permission of the mount point, and the permission of the partition
or removeable device is a completely different matter.

Michael

.



Relevant Pages

  • RE: Machine not Booting - Continued
    ... The fstab is not to blame for this issue as i have just run mkraid /dev/md0 ... and then a mount -a and the area mounted straight away. ... it has no proper file system to mount. ...
    (RedHat)
  • Re: How to set /etc/fstab again after system has started
    ... That is the incorrect statement. ... With an appropriate entry in fstab, it takes very little, ... but without it the mount command needs more information. ... The previous poster went off on a tangent, ...
    (comp.os.linux.misc)
  • Re: nfs bug & df: Can I lock up my kernel and overflow this buffer?
    ... > mount_nfs commandline switches I needed. ... You are not restricted to only the -o option with fstab. ... Since mount wasn't able to understand those switches on ...
    (freebsd-stable)
  • Machine not Booting - Update
    ... When i try a mount -a when the machine has come up i get the error below. ... I know the fs type is OK, the options are right in the fstab and i only ... This transmission is confidential and must not be used or disclosed by ... within the Corus group of companies, ...
    (RedHat)
  • Re: How to set /etc/fstab again after system has started
    ... That is the incorrect statement. ... With an appropriate entry in fstab, it takes very little, ... but without it the mount command needs more information. ... The previous poster went off on a tangent, ...
    (comp.os.linux.misc)