Adding users

Adding users

Post by Ian Zimmerma » Thu, 08 Apr 1999 04:00:00

>  Currently, I use admintool to add users.  Then I do a "make" to add
> users to the NIS environment.
>  Do you know of a way I can add users via the command line?  I
> noticed "useradd" allows you to add users, but it requires you to
> run "passwd" afterwards. Unfortunately, I don't know of a way to
> pipe information into "passwd"!

The well-known "expect" package allows you to drive programs such as
passwd noninteractively.  Check out

(URL not tested, may require permutation).

There is also a similar (but less mature) package for Perl, check CPAN
for that.  And for Emacs, check the elisp archive site (don't remember
the address now, I think it's hosted by University of Ohio).  Myself,
I have written a similar thingy for Ocaml.  Look at

and get mlexpect*

Ian Zimmerman
Lightbinders, Inc.
2325 3rd Street # 324, San Francisco, CA 94107-3138, U.S.A.