Home arrow Journal arrow Run Root Privilege Commands With Sudo Without Entering Password
Run Root Privilege Commands With Sudo Without Entering Password PDF
Monday, 17 February 2014
If you want to run commands from user account with root privilege using sudo and also you want to not enter root password when issuing the command, just edit /usr/local/etc/sudoers file and add the following line:

  johnny ALL=(ALL) NOPASSWD: ALL

where johnny is your user you are logged in with.

If want to enter password but run root privilege commands using your user shell account, you still need to edit /usr/local/etc/sudoers file and add the following line:

   johnny ALL=(ALL) ALL

If you won't do that you will get the following error:

  johnny is not in the sudoers file. This incident will be reported.


Note: sudo is available from FreeBSD's packages/ports system:

  cd /usr/ports/security/sudo
  make install clean

Last Updated ( Monday, 17 February 2014 )
 
< Prev   Next >

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?