On Thu, 23 May 2013 20:27:27 +0200, Marco Maggi wrote:
> Slackware has a "plugdev" group, and the user "marco" (whose UID and
> GID is 1000) is a member:
>
> $ grep plugdev /etc/groups
> plugdev:x:83:marco
>
> my "/etc/sudoers" file has the lines:
>
> User_Alias PLUGDEV = %plugdev
> PLUGDEV localhost = NOPASSWD: /usr/bin/pendrive
>
> where "pendrive" is the script below (it makes an ugly use of gawk, but
> I have no will now); when the device is plugged, the access permissions
> are:
I haven't really used the plugdev group myself. On my systems I want all
users to be able to mount USB disks. This is solved with the following
lines in /etc/udev/rules.d/90-local.rules
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GROUP="plugdev", MODE="0666"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GROUP="plugdev", MODE="0666"
KERNEL=="sd*[!0-9]", ATTR{removable}=="1", GROUP="plugdev", MODE="0666"
KERNEL=="sd*[0-9]", ATTRS{removable}=="1", GROUP="plugdev", MODE="0666"
Which gives rw access not only to the plugdev group but to everyone.
On my Slackware 13.1 systems I also needed to modify
/etc/dbus-1/system.d/hal.conf
My default context policy looks like this:
<policy context="default">
<!-- Allow anyone to invoke methods on the Introspectable interface --
>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.DBus.Introspectable"/>
<!-- Allow anyone to invoke methods on the Properties interface -->
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.DBus.Properties" />
<!-- Allow anyone to invoke methods on the Manager interface -->
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Manager"/>
<!-- Allow anyone to invoke methods on the Device interface -->
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device"/>
<!-- Allow members of 'users' group to mount/unmount volumes -->
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.Storage"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.Storage.Removable"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.Volume"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
</policy>
The above is for Slackware 13.1, YMMV on other versions.
regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc351(at)
poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost