sudo --version
sudo -l
Shows what commands you can run
Configuration is held in:
/etc/sudoers
You should edit this file with:
visudo
To check
cat /var/log/secure | grep patcher
For example, when you install MySQL/Percona Server using yum, by default you get a 'mysql' user with a login shell of /bin/false. It seems like good security to keep things like this. But, what can you do if you need to run something as 'mysql', like cron scheduling a backup? ...
sudo -u mysql -s crontab -l
Add a user to the sudo group to allow them to run any command...
usermod -a -G sudo myuser
Assumes this default line is present in /etc/sudoers...%sudo ALL=(ALL:ALL) ALLAdd this line to the /etc/sudoers file (using visudo) to allow user 'oracle' to run /u01/dba/patcher/perms.sh as 'root' on the host 'delphi' without needing a password...
oracle delphi = (root) NOPASSWD: /u01/dba/patcher/perms.sh