Hi again,
Unfortunately the system is locked down so upgrading sudo is not an option. Anyway, adding tty >=1 seems to fix that error?
I added the master_stderr_discard option to the constructor and one of the error lines has gone away:
" muxserver_accept_control: tcgetattr: Invalid argument "
but I still get one instance of
" tcgetattr: Invalidargument "
So, using the below code I still can't seem to get access to the imail account:
my @out = $ssh->capture({ tty => 1, stdin_data => "$password\n" }, 'sudo', '-Sk', '-p', '', '--', 'su -lc "ls" imail');
Any ideas as to what I'm still doing wrong?
tim
In reply to Re^4: Problem using Net::OpenSSH->capture to su to another user
by tim.culhane
in thread Problem using Net::OpenSSH->capture to su to another user
by tim.culhane
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |