I'd call getpwnam $username to check existence, do {1} while getpwuid ++$uid; to find an available uid.
There are corresponding perl functions for dealing with groups.
There is a User::pwent module interface, but its syntactical sugar is fairly thin, imo.
After Compline,
Zaxo
In reply to Re: So you know Perl; but do you know programming?
by Zaxo
in thread So you know Perl; but do you know programming?
by Marza
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |