Alvaro,
try also using 'expect' command.
thanks,
Glenn A.S. Contreras
From: "Alvaro Torres F." <[EMAIL PROTECTED]> Reply-To: Solaris-Users mailing list <[EMAIL PROTECTED]> To: Solaris-Users mailing list <[EMAIL PROTECTED]> Subject: Re: [Solaris-Users] How to change a password in a shell script Date: Mon, 29 Mar 2004 01:20:15 +0000
Hello again. I found the way to insert the encripted password in de /etc/shadow
Here is the code:
echo $nombre_usuario:`perl -e '$x=crypt('$clave','nusuario'); print $x'`::::::: >> /etc/shadow
where $nombre_usuario = username $clave = The password (to be encripted) nusuario = a keyword to generate the encriptation.
that's all
Thank to everyone.
Alvaro Torres F.
El dom, 28-03-2004 a las 03:07, Alvaro Torres F. escribi�: > hello. > I need add 112 users on a solaris 9 machine. > I make a shell script for adduser, but I don't know how can I made > with the passwords. > Somebody can tell me a way to add a password for an user without the > interactivity of the command "passwd" in order put inside my shell > script. > > Atte Alvaro Torres > > _______________________________________________ > Solaris-Users mailing list > [EMAIL PROTECTED] > http://www.filibeto.org/mailman/listinfo/solaris-users
_______________________________________________ Solaris-Users mailing list [EMAIL PROTECTED] http://www.filibeto.org/mailman/listinfo/solaris-users
_________________________________________________________________
Watch LIVE baseball games on your computer with MLB.TV, included with MSN Premium! http://join.msn.com/?page=features/mlb&pgmarket=en-us/go/onm00200439ave/direct/01/
_______________________________________________ Solaris-Users mailing list [EMAIL PROTECTED] http://www.filibeto.org/mailman/listinfo/solaris-users
