in reply to Re^2: expect and adduser
in thread expect and adduser

On my system, adduser is just a symlink to useradd. And it doesn't have a firstuid option. However, if no uid is supplied on the command line, it picks the first available uid above 99, and above any other user.

If I were to write such a tool (and I've done so in the past), I'd just open /etc/passwd and /etc/shadow for append (if needed /etc/group as well) and write the necessary lines. But that's just me. Or I use useradd/adduser to setup everything, but the password, and require the user to visit my office and type in his/her password.

Perl --((8:>*