I am new to perl and have been trying a test script to perform a simple task by connecting to the root user and executing a command. I have not been very successful in this. Please assist. I have below: the sudoers file as well as my code piece. the test.log has no data in it.
# User alias specification User_Alias ROOT_ALLOW_SU=<myuser>I run the following in perl and my file is not populated: system('sudo suroot -i /usr/bin/df -k > test.log');
# Cmnd alias specification
# Defaults specification
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
ROOT_ALLOW_SU ALL = NOPASSWD: /usr/local/bin/suroot
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
In reply to sudo not working by Vishza
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |