What exactly doesn't work? Could you try username ALL=NOPASSWD: /sbin/shutdown Regards Harry
-----Original Message----- From: growbynet@hotpop.com [SMTP:growbynet@hotpop.com] Sent: Friday, May 02, 2003 5:36 AM To: suse-linux-e@suse.com Subject: [SLE] how to allow user to use shutdown command?
I have tried to add the following to sudoers, but it's not work :( username ALL=/sbin/shutdown
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Friday 02 May 2003 08:24, Berge, Harry ten wrote:
What exactly doesn't work?
that command when I try to execute it from the user account
Could you try username ALL=NOPASSWD: /sbin/shutdown
OK, if I add above line to sudoers and save, then: linux:~ # su username username@linux:/root> shutdown -r now bash: shutdown: command not found username@linux:/root> /sbin/shutdown -r now shutdown: you must be root to do that! username@linux:/root> shutdown bash: shutdown: command not found username@linux:/root> /sbin/shutdown shutdown: you must be root to do that! username@linux:/root> And no, I did not altered my system, it's a fresh install of SuSE 8.2 pro.
OK, if I add above line to sudoers and save, then: username@linux:/root> /sbin/shutdown shutdown: you must be root to do that! And no, I did not altered my system, it's a fresh install of SuSE 8.2 pro.
To use sudo, you still need to type it Try: sudo shutdown -r now -- James Ogley, Webmaster, Rubber Turnip james@rubberturnip.org.uk http://www.rubberturnip.org.uk Jabber: riggwelter@myjabber.net Using Free Software since 1994, running GNU/Linux (SuSE 8.2) GNOME updates for SuSE: http://www.usr-local-bin.org
On Friday 02 May 2003 16:20, James Ogley wrote:
To use sudo, you still need to type it
Try:
sudo shutdown -r now
username@linux:/root> sudo shutdown -r now sudo: /etc/sudoers is mode 0640, should be 0440 linux:~ # chmod 440 /etc/sudoers linux:~ # su username username@linux:/root> sudo shutdown -r now Password: sudo: shutdown: command not found username@linux:/root> :( Probably I just need to go thru YaST2 (Security and Users->Security Settings)
The 03.05.03 at 03:40, growbynet@hotpop.com wrote:
username@linux:/root> sudo shutdown -r now Password: sudo: shutdown: command not found
Of course. It means that sudo has not found the shutdown command. Type: sudo /sbin/shutdown -r now If you want to type less, add an alias: edit your "/home/user/.alias" file, and add the line: alias shutdown="sudo /sbin/shutdown -r now" Still, it will ask for your password - as it should be. I normally use "halt" (no parameters), and I always have got to be root to use that command, on all *nix versions I tried. Nothing new there... -- Cheers, Carlos Robinson
participants (4)
-
Berge, Harry ten
-
Carlos E. R.
-
growbynet@hotpop.com
-
James Ogley