View Single Post

   
  #9 (permalink)  
Old 02-20-2008, 11:06 PM
King Beowulf
 
Posts: n/a
Default Re: Slackware 12.0 and HAL usage - Read this!

Robby Workman wrote:
> Hey guys, one (relatively) minor issue encountered after release,
> but it's easy enough to work around. I originally posted this at
> http://www.linuxquestions.org/questi...d.php?t=566862
> but here it is again for the archives:
>
> Many people have figured this out by now, but there's one "gotcha"
> with automounting removable devices using HAL.
> Console users are automatically added to the cdrom and plugdev groups
> at login via /etc/login.defs
>
> # List of groups to add to the user's supplementary group set
> # when logging in on the console (as determined by the CONSOLE
> # setting). Default is none.
> #
> # Use with caution - it is possible for users to gain permanent
> # access to these groups, even when not logged in on the console.
> # How to do it is left as an exercise for the reader...
> #
> CONSOLE_GROUPS floppy:audio:video:cdromlugdev
>
> The idea behind doing this was that it would "just work" without the
> need for admins to manually add users to the plugdev and cdrom groups,
> but due to the way dbus functions, it didn't work out that way.
> When the messagebus service is started, it reads the content of
> /etc/group and then determines whether users have rights to mount
> removable devices based on that. This is why the 'reload' option was
> added to /etc/rc.d/rc.messagebus, as you need to make it aware of any
> changes to /etc/group if you happen to edit that file to add users to
> plugdev, cdrom, power, or video groups while dbus is running.
>
> Long story short, you will need to manually add users to the affected
> groups - do not rely on the output of groups(1) to determine whether
> a user is in the appropriate group as it pertains to dbus and HAL.
>
> For those interested in further reading, note that this is not a
> Slackware-specific problem - it's being discussed in various other
> distribution forums as well.
>
> http://www.debian-administration.org.../308#comment_7
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=377689
> http://www.mail-archive.com/debian-d...msg240793.html
>
> Note that the "solutions" presented in the first two links are *ugly*
> so my recommendation is to not even consider them, but of course, it's
> *your* system. The *best* way until/unless something changes in the
> dbus code (which doesn't seem to be easy to do in an effective and
> secure manner) is to manually add users to the needed groups in
> /etc/group.
>
> Thanks to Motoko-chan for help with confirming this and providing the
> links above, and thanks to Andrew Brouwers for accidentally providing
> the bug report :-)
>
> RW


Another question: Why does "root" need to be added to those groups to get it to
work? This may be a naive query but I am curious.
Reply With Quote