in reply to So you know Perl; but do you know programming?

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

  • Comment on Re: So you know Perl; but do you know programming?

Replies are listed 'Best First'.
Re: Re: So you know Perl; but do you know programming?
by Marza (Vicar) on Jul 04, 2002 at 04:45 UTC

    Excellent! There is always a better way to do something. Now I can dump the hashes and one loop! Cool more stuff to read and play! Hmmm I will have to review the perl docs again. Should have saw that one!

    Thank you! ++ when I get votes again!