Hello all,
Could some one help me with the following code? Basically the code
works OK except for the fact that the user $new_user (s) home dir is not
created?
#!/usr/bin/perl -w
use Unix::PasswdFile;
my $new_user = "test7";
my $new_fname = "Test";
my $new_lname = "Account";
my $new_pass = "password";
my $pw = new Unix::PasswdFile "/etc/passwd";
$pw->user("$new_user", $pw->encpass("$new_pass"), $pw->maxuid + 1, 45,
"$new_fname $new_lname", "/home/$new_user", "/bin/false");
$pw->passwd("$new_user", $pw->encpass("$new_pass"));
$pw->commit();
undef $pw;
system("pwconv $new_user");
Am I missing something here?
Regards,
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]