1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-discuss] Cannot unmount media as user
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-discuss%40mageia.org?Subject=Re%3A%20%5BMageia-discuss%5D%20Cannot%20unmount%20media%20as%20user&In-Reply-To=%3C4FD47E40.8080409%40laposte.net%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="007747.html">
<LINK REL="Next" HREF="007749.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-discuss] Cannot unmount media as user</H1>
<B>andre999</B>
<A HREF="mailto:mageia-discuss%40mageia.org?Subject=Re%3A%20%5BMageia-discuss%5D%20Cannot%20unmount%20media%20as%20user&In-Reply-To=%3C4FD47E40.8080409%40laposte.net%3E"
TITLE="[Mageia-discuss] Cannot unmount media as user">andre999mga at laposte.net
</A><BR>
<I>Sun Jun 10 13:00:16 CEST 2012</I>
<P><UL>
<LI>Previous message: <A HREF="007747.html">[Mageia-discuss] Cannot unmount media as user
</A></li>
<LI>Next message: <A HREF="007749.html">[Mageia-discuss] Cannot unmount media as user
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7748">[ date ]</a>
<a href="thread.html#7748">[ thread ]</a>
<a href="subject.html#7748">[ subject ]</a>
<a href="author.html#7748">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Len Lawrence a écrit :
><i> On 10/06/12 10:59, andre999 wrote:
</I>>><i> Len Lawrence a écrit :
</I>>>><i> Mageia 2 fully updated
</I>>>><i> GNOME Classic
</I>>>><i>
</I>>>><i> This is probably a newbie question.... I am not sure when this
</I>>>><i> started to happen but when, as a user, I try to unmount a USB drive
</I>>>><i> via the desktop icon I am told that I am not authorized to perform
</I>>>><i> that operation. After browsing bugzilla and the forums it looked
</I>>>><i> like the best way to get past this would be to use sudo. However,
</I>>>><i> editing the sudoers file always throws up a syntax error. I have
</I>>>><i> tried various commands based on examples but cannot get any to work.
</I>>>><i>
</I>>>><i> e.g.
</I>>>><i>
</I>>>><i> ALL /bin/umount NOPASSWD
</I>>>><i> %users /bin/umount NOPASSWD
</I>>>><i> %users localhost=/bin/umount NOPASSWD
</I>>>><i>
</I>>>><i> What is the correct recipe? RTFM only makes my old brain spin.
</I>>>><i>
</I>>>><i> Len
</I>>>><i>
</I>>><i>
</I>>><i> try :
</I>>><i>
</I>>><i> %users ALL=/bin/umount NOPASSWD: ALL
</I>>><i>
</I>>><i> or maybe :
</I>>><i>
</I>>><i> %users ALL=/bin/umount device NOPASSWD: ALL
</I>>><i>
</I>>><i> where "device" is whatever the usb drive is mounted as.
</I>>><i> Not workable if "device" is variable.
</I>>><i>
</I>>><i> Alternately, you could do :
</I>>><i> su
</I>>><i> (enter password)
</I>>><i> umount ...
</I>>><i>
</I>>><i> As to why you are having the problem :
</I>>><i> It means that the drive was mounted with root privileges, or the
</I>>><i> privileges of another user.
</I>>><i> Thus it is requiring root privileges (or that of the other user) to
</I>>><i> unmount.
</I>>><i>
</I>>><i> Was it plugged it when the system was booted ? That could cause it to
</I>>><i> have root privileges.
</I>>><i> Is it in a line the /etc/fstab file ?
</I>>><i> (if so, you just have to add the option "users" in the
</I>>><i> comma-separated list in the third position in the line.)
</I>>><i>
</I>>><i> Or it could be a bug.
</I>>><i>
</I>><i> A bug seems doubtful because there do not seem to be any other reports
</I>><i> of this behaviour. I have been forced to take the direct su/password
</I>><i> route.
</I>><i>
</I>><i> The medium was plugged in at boot time but has been removed and
</I>><i> replugged a few times. I had not considered that point. What you are
</I>><i> saying is that removable media are treated as fixed if already plugged
</I>><i> in at boot time? This is starting to make sense.
</I>
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.
><i> Will investigate fstab, edit if necessary and reboot without the
</I>><i> drive . And if that works, mend sudoers.
</I>
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.
><i>
</I>><i> Thanks
</I>><i>
</I>><i> Len
</I>><i>
</I>><i>
</I>
--
André
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="007747.html">[Mageia-discuss] Cannot unmount media as user
</A></li>
<LI>Next message: <A HREF="007749.html">[Mageia-discuss] Cannot unmount media as user
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7748">[ date ]</a>
<a href="thread.html#7748">[ thread ]</a>
<a href="subject.html#7748">[ subject ]</a>
<a href="author.html#7748">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-discuss">More information about the Mageia-discuss
mailing list</a><br>
</body></html>
|