[rancid] Can clogin prompt for a password?

heasley heas at shrubbery.net
Thu Aug 4 17:22:45 UTC 2016


Thu, Aug 04, 2016 at 06:29:15PM +0200, Jean Benoit:
> 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)

note that a process'es enviroment is usually also available from ps;  ps -e.



More information about the Rancid-discuss mailing list