Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 06-03-2009, 07:25 PM   #1
Registered: May 2004
Distribution: Slackware
Posts: 173

Rep: Reputation: 22
Using sudoers to allow non-root eject

In the past, I have found that I needed to make /usr/bin/eject SUID in order to allow, for instance, Amarok to disconnect from my iPod when running as non-root.

The other day, having read up a little on the sudoers file, I figured it ought to be possible to add command specific entries to /etc/sudoers in order to allow members of the plugdev group to eject, etc.

So I added the following lines to /etc/sudoers

Cmnd_Alias EJECTCMD /usr/bin/eject, /usr/bin/kdeeject, /usr/bin/kio_media_manager

and prepended "sudo" to the "Post-Disconnect Command" in Amarok.

Presto, no need to have /usr/bin/eject as SUID anymore.

It seems to me this is probably a safer solution. Any comments from those more knowledgeable than I?
Old 06-03-2009, 08:09 PM   #2
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 122Reputation: 122
About all this does is prevent people outside the plugdev group from using eject as root. Otherwise, it's much the same.
Old 06-03-2009, 08:27 PM   #3
Senior Member
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Well personally I hate having things SUID on my system. I think the sudoer idea is far preferable limiting members to the plugdev group. Here is one of many articles about the dangers of setting SUID on programs Maybe I'm just paranoid !


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sudoers - root question armandino Linux - General 4 03-05-2009 06:57 AM
Can't eject iPod as normal user, but works as root FreeThinkerJim Linux - Hardware 3 11-18-2005 08:19 PM
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 05:03 PM
can only eject as root Cinematography Linux - Hardware 10 08-28-2005 04:47 PM

All times are GMT -5. The time now is 10:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration