3
I'm trying to hack together my own Android app that opens an SSH connection to my computer, and sends commands.
I am aiming to keep the interactivity of this process to a minimum, to make it have the feel of a remote control.
I've added a sudo "switch" that when activated will ask for a sudo password that then will run a command x to be run as sudo -S -p '' x
and then the password will be sent to the STDIN.
Problem is if the login fails, the command will then wait for another 2 password attempts, adding interactivity that I don't want!
I know I can edit passwd_tries
in the sudoers
file, but I rather know if there was a way to set this as an argument with sudo or is it also an enviroment variable that can be set?
Anyone know? Or is this not allowed for security reasons?
Could you just have it check and, if the password failed, just do a couple quick "spam" messages to use up the next two password attempts? Certainly not a very nice solution, but it's an option. – SaintWacko – 2012-09-10T13:27:53.183