[rancid] Can clogin prompt for a password?
Jean Benoit
jean at unistra.fr
Thu Aug 4 16:29:15 UTC 2016
On Thu, Aug 04, 2016 at 10:35:11AM -0500, Brandon Ewing wrote:
> Hrm, I kind of like this approach -- environment variable passing into
> command line. Would it be feasible to reset $0 in *login to mask the passed
> in password in a process listing?
Following your idea and John Heasley's idea, I suggest this solution,
which leaves no trace in a file:
* create a wrapper that asks for password and keep it in memory
as an env. variable then executes a shell
wrapper.sh
#!/bin/bash
echo -n password:
stty -echo
read p
stty echo
RANCIDPASSWORD="$p" exec bash
* put this in .cloginrc
add password * $env(RANCIDPASSWORD)
--
Jean
More information about the Rancid-discuss
mailing list