Subject: Re: smmsp update on binary upgrade; useradd usage hint requested
To: Greg Troxel <gdt@ir.bbn.com>
From: Alistair Crooks <agc@pkgsrc.org>
List: current-users
Date: 06/25/2004 23:14:57
On Fri, Jun 25, 2004 at 04:48:41PM -0400, Greg Troxel wrote:
> useradd complains about the homedir being missing, and doesn't provide
> (that I can see in the man page) an option to not whine.

Well, if the directory does not exist, and you didn't ask it to make the
directory, useradd(8) considers that a whinable offence.

> Also, I didn't find an option to set the passwd to *.  Perhaps a
> 'system user' argument that would do these things.

By default, the password is set to '*'.  Or is it 13 '*'?  I can't
remember now, it's been a while. Whatever, it's not a valid value
that a password will hash to.

> Also, it would be cool to have a flag to just exit without errors if
> the line exists and matches what would have been added.

Well, yes, I agree, but user(8) was coded up from Solaris manual
pages, and that's not what Solaris (or the other System V deviants I
could lay my hands on at the time) do.  Thinking about it, it would be
nice to have, but you can always use finger to find out if the user
exists. (I would have suggested awk, but that won't work for NIS
entries). It would also be a fair amount of work to implement.
 
> Then, binary upgrades could just add new users/groups.

Yes, nice idea.

Regards,
Alistair