[Mageia-discuss] Cannot unmount media as user
andre999mga at laposte.net
Sun Jun 10 13:00:16 CEST 2012
Len Lawrence a écrit :
> On 10/06/12 10:59, andre999 wrote:
>> Len Lawrence a écrit :
>>> Mageia 2 fully updated
>>> GNOME Classic
>>> This is probably a newbie question.... I am not sure when this
>>> started to happen but when, as a user, I try to unmount a USB drive
>>> via the desktop icon I am told that I am not authorized to perform
>>> that operation. After browsing bugzilla and the forums it looked
>>> like the best way to get past this would be to use sudo. However,
>>> editing the sudoers file always throws up a syntax error. I have
>>> tried various commands based on examples but cannot get any to work.
>>> ALL /bin/umount NOPASSWD
>>> %users /bin/umount NOPASSWD
>>> %users localhost=/bin/umount NOPASSWD
>>> What is the correct recipe? RTFM only makes my old brain spin.
>> try :
>> %users ALL=/bin/umount NOPASSWD: ALL
>> or maybe :
>> %users ALL=/bin/umount device NOPASSWD: ALL
>> where "device" is whatever the usb drive is mounted as.
>> Not workable if "device" is variable.
>> Alternately, you could do :
>> (enter password)
>> umount ...
>> As to why you are having the problem :
>> It means that the drive was mounted with root privileges, or the
>> privileges of another user.
>> Thus it is requiring root privileges (or that of the other user) to
>> Was it plugged it when the system was booted ? That could cause it to
>> have root privileges.
>> Is it in a line the /etc/fstab file ?
>> (if so, you just have to add the option "users" in the
>> comma-separated list in the third position in the line.)
>> Or it could be a bug.
> A bug seems doubtful because there do not seem to be any other reports
> of this behaviour. I have been forced to take the direct su/password
> The medium was plugged in at boot time but has been removed and
> replugged a few times. I had not considered that point. What you are
> saying is that removable media are treated as fixed if already plugged
> in at boot time? This is starting to make sense.
It has happened to me in the past, although currently I have no problem
with a dvd that I sometimes have inserted on boot. (I use Gnome as
well, but haven't yet updated to mga2.)
If that is the cause, either something is not configured right or not
installed, or it is a bug.
If you have systemd activated, a configuration problem is not unlikely.
> Will investigate fstab, edit if necessary and reboot without the
> drive . And if that works, mend sudoers.
For fstab, the "users" option lets any user unmount the drive, even if
they didn't mount it. As well as mount it. It is a good option to use
for removable media.
More information about the Mageia-discuss