Ubuntu 12.04 sudoers – shutdown and rebooting with normal user

Posted: September 17, 2012 in Backtrack, Linux, Ubuntu

Here’s if you want to boot your Ubuntu 12.04 machine without typing a password :

1. Put your command on /etc/sudoers.d/shutdown

sudo visudo -f /etc/sudoers.d/shutdown

 

2. Type this :

# Cmnd alias specification
 Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/halt, /sbin/reboot
# User privilege specification
 rumy ALL = (ALL) NOPASSWD: SHUTDOWN_CMDS

3. Save it

4. Execute it like this :

rumy@cbug-lair:~$ sudo /sbin/reboot
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s