Search

Google
 

sudo

SUDO Installation:

Download the sudo source from : ftp://ftp.sudo.ws/pub/sudo/

  • gunzip sudo*
  • tar xvf sudo*
  • cd sudo-version
  • ./configure
  • make
  • make install
Configuration:
  • Control file - /etc/sudoers – should not be edited manually.
  • Command to edit sudoers file /usr/local/sbin/visudo
  • Entries “user hostlist = (userlist) commandlist”
  • Sample Entries :
    • All users to do dialup ALL ALL=/dialup,/hangup
    • sara user alone to execute all root commands sara ALL=(root)
  • ALL Default setting will have sudo command with password If we need to disable sudo without password ALL NOPASSWD:ALL=/dialup,/hangup Restricting commands: %users ALL = ALL, !SU, !SHELLS
Using SUDO:

sudo name-of-command
  • If the SUDO is enable with password first time it will ask for password which is the users password, for next 5 mins it will not ask again.
  • Eg:
    1. $ whoami sara
    2. $ sudo whoami root
Audit log file path “/var/log/sudo.log “