Su and sudo :
1/ Su use for switch user in linux:
#su username
2/ Sudo use for allow permmision for user .
#Login as Root
#visdo
#dara All=All (allow dara run all commands from all host)
#dara All=NOPASSWD: /sbin/reboot (allow dara run only reboot )
#%finance All=NOPASSWD: /sbin/reboot (allow finance group run only reboot )
Test Locgin as user dara
========================================================================
#passwd root
New password: Right-click = QEWGWGIWUYCEYCCEUF+_-
--------------------------------------------------
su
su root
su -
--------------------------------------------------
su vuthy
--------------------------------------------------
Sudo
- give user permission to run any commands without root pwd
#sudo reboot
=> type user password
=> dara
--------------------------------------------------
dara All =NOPASSWORD: /sbin/reboot
dara localhost =All
All host=All commands
EmoticonEmoticon