0

I want to authenticate a process by sending my password e.g. (but fails):

echo $SU_PASSWORD | /afs/cs/software/bin/reauth

with error:

Password for brando9: stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device

I cannot install apt packages nor do I have sudo. Thus for now these solutions don't work:

  • using expect
  • using sshpass
  • using sudo
  • I don't think using passphrases works, ideally sending the password string is what I want to do.

But I do have ssh.

I also have packages listed https://gist.github.com/brando90/a7e0d716148d1e87eb947bd85318f479 (ran apt list --installed > apt_install.txt).

Is there a way to send the password to the reauth command when echoing is disabled without using tmux, or screen? Ideally I want to use nohup.


related:

Charlie Parker
  • 1,497
  • 3
  • 16
  • 28
  • Both python and perl have expect-like modules (IMO, they're better than actual [expect](https://core.tcl.tk/expect/) because learning tcl just for expect is wasted effort that would be better spent getting more proficient with general purpose languages like perl or python), that don't require root privs to install under `~/`. e.g. python has [pexpect](https://github.com/pexpect/pexpect) and perl has [Expect.pm](https://metacpan.org/dist/Expect). Perl also has numerous specialised expect-like modules including [Net::SSH](https://metacpan.org/release/Net-SSH) that makes it easy to automate ssh. – cas Nov 26 '22 at 10:56

0 Answers0