[olug] password change one liner shell script

Nick Walter waltern at iivip.com
Fri Sep 5 16:37:35 UTC 2003


echo $passwordvariable | passwd --stdin username

^ That ought to do it.  It does on my RH9 system anyway :)

Nick Walter

On Fri, 2003-09-05 at 11:40, Derek & Lisa wrote:
> I want to set a user password all in one line, not by interactive prompt. 
> (bash shell script)
> 
> passwd username | sleep 1s && echo $passwordvariable |  echo $passwordvariable
> 
> Something like that, but that actually works and enters the password twice.
> 
> any ideas?
> 
> ty
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
> 



More information about the OLUG mailing list