Other Help Topics :: sudo - /opt/sudoers - password - Linux question



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

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?

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?

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

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

Next Page...
original here.