alvaro,



You may want to used 'expect' as well.


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

_________________________________________________________________
Check out MSN PC Safety & Security to help ensure your PC is protected and safe. http://specials.msn.com/msn/security.asp


_______________________________________________
Solaris-Users mailing list
[EMAIL PROTECTED]
http://www.filibeto.org/mailman/listinfo/solaris-users

Reply via email to