Y
yo
I have the following perl script which works fine.
#!/usr/bin/perl
open(INFILE, "@ARGV[0]");
$infile = <INFILE>;
($username,$password) = split(/\|/, $infile);
close(INFILE);
@calladduser = ("/usr/sbin/adduser $username -g 503 -d
/home/mailusers/$username
-s /sbin/nologin -p $password","\n");
system("@calladduser");
my problem is im using shadow passwords and adduser -p doesn't use
crypt on the password.
How can i use the passwd command in this perl script to use the value
from $password without asking for user input. Another words i dont
want it to be interactive.
im not very good with perl and any help would be great
TIA, P
#!/usr/bin/perl
open(INFILE, "@ARGV[0]");
$infile = <INFILE>;
($username,$password) = split(/\|/, $infile);
close(INFILE);
@calladduser = ("/usr/sbin/adduser $username -g 503 -d
/home/mailusers/$username
-s /sbin/nologin -p $password","\n");
system("@calladduser");
my problem is im using shadow passwords and adduser -p doesn't use
crypt on the password.
How can i use the passwd command in this perl script to use the value
from $password without asking for user input. Another words i dont
want it to be interactive.
im not very good with perl and any help would be great
TIA, P