
FishMonger
Veteran
May 23, 2009, 6:44 AM
Post #2 of 16
(1068 views)
|
|
Re: [webpdx] I need help with perl script to add users to nis server
[In reply to]
|
Can't Post
|
|
Why are you manually creating the home dir and modifying the passwd, shadow, and group files? It would be better to use the standard linux utilities i.e., useradd, and groupadd. Why are you not using the warnings and strict pragmas? Each of the die statements on the open calls should include the reason it failed which is in $! If you want to make sure the uid is above 500, then simply initialize $u (in the FindUID sub) to 500.
|