in reply to Re^3: Problem using Net::OpenSSH->capture to su to another user
in thread Problem using Net::OpenSSH->capture to su to another user
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Problem using Net::OpenSSH->capture to su to another user
by salva (Canon) on Jun 04, 2014 at 11:05 UTC | |
by tim.culhane (Initiate) on Jun 04, 2014 at 12:59 UTC | |
by salva (Canon) on Jun 04, 2014 at 13:09 UTC | |
by tim.culhane (Initiate) on Jun 04, 2014 at 13:51 UTC | |
by salva (Canon) on Jun 04, 2014 at 14:43 UTC | |
| |
by AppleFritter (Vicar) on Jun 24, 2014 at 09:58 UTC |