I have two CentOS VMs I used for certain tasks when I need them. I ran into an issue with running sudo from a script and I found the solution was to uncomment the "requiretty" option in the sudoers file.
What I'm puzzled about is when I went to apply the change in the other VM, it did not have this option.
The first VM has the following in its sudoers file
Code: Select all
# Defaults specification
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
# You have to run "ssh -t hostname sudo <cmd>".
#
Defaults requiretty
#
# Refuse to run if unable to disable echo on the tty. This setting should also be
# changed in order to be able to use sudo without a tty. See requiretty above.
#
Defaults !visiblepw
Code: Select all
# Defaults specification
#
# Refuse to run if unable to disable echo on the tty.
#
Defaults !visiblepw
If someone can confirm how this could have happened I'd appreciate it.
Thanks