Hi all, I mean to do what I want I had to add the following system command is there and easier way to do the following code add on...?
#!/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"); system("mkdir /home/$new_user"); system("chown $new_user /home/$new_user"); system("chgrp popusers /home/$new_user"); Thx, Dan 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] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]