Hi,  I am developing a program that sets passwd for any user but i dont want 
the operator sets the passwd. I want to give it as a result of a function

[EMAIL PROTECTED] victor]$ perl passwd.pl victor1

#!/usr/bin/perl
$usuario=$ARGV[0];
$passwd="PASSWDGENERATEBYOTHERFUNCTION"
`sudo /usr/sbin/useradd -c $usuario -s /sbin/nologin $usuario`;
`sudo /usr/bin/passwd $usuario`;

I could add the user, but in the set passwd line.
When I use this script always I have a prompt of password assigment that I dont 
want. Could you give me some light of what can I do?

Thanks in advance,

Victor

Reply via email to