Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ 1 [2] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: sudo - /opt/sudoers - password - Linux question< Next Oldest | Next Newest >
john.martzouco Offline





Group: Members
Posts: 253
Joined: Nov. 2007
Posted: Dec. 22 2007,00:46 QUOTE

This has been helpful.  visudo worked well (now I have to pay more attention to all those chapters about vi that I've been ignoring).

I'm trying to grant my guest user the priviliges to shut down the machine.  I've tried entering the next two lines into /etc/sudoers with visudo.  It reports that I have errors with the first one... so I thought I'd check with you guys to get a kickstart on setting this up.  I'm reading the man page, and it will be very helpful... much more helpful after I have one new entry that sheds light.

Here's what I've tried:

/etc/sudoers:
Code Sample

Cmnd_Alias      SHUTDOWN = /sbin/shutdown
guest       ALL = DUMPS, KILL, SHUTDOWN


Will this allow my user to shutdown via the desktop icon?  How close am I to having legitimate settings for the user named guest?

Thanks
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Dec. 22 2007,09:49 QUOTE

I have never used vi since the first try, it felt so anti-userfriendly to me.. So I set the environment variable EDITOR to nano, and visudo will use nano instead (though this feature can be compiled out, not sure if it's in DSL)

Does your sudoers file also have DUMPS and KILL defined?


--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
john.martzouco Offline





Group: Members
Posts: 253
Joined: Nov. 2007
Posted: Dec. 22 2007,11:03 QUOTE

Thanks curaga,

export EDITOR=beaver worked perfectly well too.

No, I only added the two lines to the default sudoers file; DUMPS and KILL are not in it.

Will that be all I need then, the 2 statements I used plus the DUMPS and KILL?
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Dec. 22 2007,16:44 QUOTE

or take them out, so your last line comes
Quote
guest       ALL = SHUTDOWN


--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
john.martzouco Offline





Group: Members
Posts: 253
Joined: Nov. 2007
Posted: Dec. 22 2007,18:13 QUOTE

That worked perfectly curaga.

In the end, it's two lines in sudoers:
Code Sample
Cmnd_Alias      SHUTDOWN = /usr/bin/exit.lua
...
guest       ALL = SHUTDOWN
Back to top
Profile PM 
9 replies since Dec. 19 2007,14:21 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ 1 [2] >/
reply to topic new topic new poll
Quick Reply: sudo - /opt/sudoers - password - Linux question

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code