Subject: "adduser" proposal
To: None <>
From: Simon Burge <>
List: tech-userlevel
Date: 10/16/1998 12:48:52
I've had a bit of a look around at what seems to be the available
"adduser" scripts and programs available for NetBSD, and also a couple
of others (Solaris, FreeBSD and OpenBSD).  I've got absolutely zero
knowledge on Linux, so I didn't even know where to start to look for
what they do.  All assumptions about all packages are based on man pages
or usage messages only.

I'm restricting myself to only command-line driven interface for now -
not the interactive or GUI based ones.  I'll guess that these will be
relatively easy front ends for anything else that exists.

I'll assume that Alistair Crooks's addnerd is a good place to start, and
also that some form of CDE/SVID3 compatibily is a "Good Thing(tm)".

There's a couple of inconsistancies with the CDE/SVID3 way of doing
things.  Here's a summary:

 +  Missing "-f inactive" - NetBSD's passwd(5) doesn't have the concept
    of an "inactive" timer.

 +  Missing "-e expiry" - NetBSD's passwd(5) supports this and should
    not be too much work.

 +  useradd has a "-d dir" option to specify the home directory of the
    user, whilst addnerd has a "-h dir" to specify the parent of the new
    user's home directory.  Supporting both a "-d" and a "-h" option
    should not be too much work.

 +  useradd has a "-m" option which creates the user's home directory if
    it does not already exist.  A reason why you would ever not want to
    do this escapes me at the moment...

 +  useradd has a "-k skeldir" option which determines where to get the
    initial files for the account. adduser assumes (I think!) it'll
    install files from a preset directory unconditionally.

Other things we can consider supporting:

 +  Our password change date field.  Just adding an option to set this
    to "-1" to force a password change straight away would probably be

 +  An option to set a quota in the user's home directory?  I've never
    used quotas...

 +  Something to set a plain-text password on the command line?  Addnerd
    uses "-p encrypted" - Simon Gerraty's adduser program does this with
    "-P plaintext" (as well as using "-p encrypted" too)...

I'd suggest installing this program as both "adduser" and "useradd"
- this keeps both the CDE/SVID3 people happy, and well as just about
everyone else who would seem to expect such a command to be called

As for related commands, let's chose "usermod", "userdel", "groupadd",
"groupmod" and "groupdel" for names.  There doesn't seem to be any sort
of convention (that I can see!) except for the CDE/SVID3 way of doing
things - well maybe both "rmuser" and "userdel"...  Let's for now say
that a userdel command, and the group* commands will be a SMOP, and
that a usermod command could either share a lot of code with a useradd
command or be based on the same.

If people are happy with this, I'd be happy to take on the work.  I'd
also be happy if Alistair took on the work too :-)

Comments, flames, free tacos?

Solaris 2.6 {user,group}{add,mod,del}(1m)