----- Original Message ----
From: Jeremy Visser <[EMAIL PROTECTED]>
To: Mark A. Bell <[EMAIL PROTECTED]>
Sent: Monday, 26 February, 2007 9:49:58 AM
Subject: Re: [SLUG] simple sudoers question

Mark A. Bell wrote:
> Hello,
> 
> I'm running Ubuntu Edgy and I want to give myself permission to halt
> my system without using sudo and a password. I've added the following
> to /etc/sudoers using visudo:
> 
> mark    localhost = NOPASSWD: /sbin/halt
> 
> But still I get a message that I 'need to be root'. Can someone help?

I know that you can do:

    sudo chmod +s /sbin/halt

...because you said you wanted to do it _without_ sudo. That's the only
way if you want to do it without using sudo.

> Also, do changes to /etc/sudoers become effective immediately, or do
> I need to restart something to make my system recognize them?

I think as long as you use visudo it should take effect immediately.

-------------------------------------------------------------------------------------------------------

Thanks Jeremy!

Now I see what I was doing wrong. I should have used:

$ sudo /sbin/halt

This does the trick nicely - no need to type my password.

- mark

  http://www.flickr.com/photos/m487396
  Power corrupts. PowerPoint corrupts absolutely.





Send instant messages to your online friends http://au.messenger.yahoo.com
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to