Steps to allow non-root non-admin user to shutdown or reboot a CentOS system:
- Login as root in the terminal
 - Create a new group on Centos named ‘developers’ or you may assign the right to an existing group as well.
 - Install Sudo by using the command: $ yum install sudo
 - Now edit the sudo configuration using the command: $ visudo
 - Look for some thing like ‘# %users localhost=/sbin/shutdown now’
 - Press ‘i’ or insert keyboard button of your keyboard to start editing the config file
 - Below the above line add the following lines:
- %developers ALL=/sbin/shutdown now
 - %developers ALL=/sbin/reboot
 
 - now save the config file by doing:
- press ‘Esc’ keyboard button
 - then type without quotes: “:wq!”
 - Hit return key
 
 
Now any user of the group ‘developers’ will be able to shutdown the system using the following command
$ sudo shutdown now
To reboot:
$ sudo reboot
Control Center,chose Startup Application
Startup program–Add
name Shutdown
command sudo shutdown -h 18:15
Comment “shutdown -h 18:15:
/mf
Post a Comment for "Shutdown Sudo di Centos"
Komentar Saudara/i sangat bermanfaat untuk membangun Blog ini,Terimakasih
Your comments are very useful for building this blog, thank you