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/27/2004 22:00:35
On Sat, Jun 26, 2004 at 12:15:24PM -0400, Greg Troxel wrote:
> > 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.
> 
> It's 13 x '*', which is a) not what's checked in to
> src/etc/master.passwd for system accounts and b) I prefer a single *.
> I concur that both of these are not in the range of the hashes.

See:

revision 1.65
date: 2002/11/08 11:53:20;  author: agc;  state: Exp;  lines: +9 -7
When deleting a user with preservation, use a password of
"*************" rather than a single asterisk - it's just as difficult
to hash to the longer password since the asterisk character itself is
not in its alphabet, and pwd_mkdb now thinks it's a valid DES password.

and

revision 1.57
date: 2002/08/07 14:24:52;  author: wiz;  state: Exp;  lines: +6 -5
Set the default password (if not specified) to a single star instead
of PasswordLength stars.

(both log entries for user.c)
 
> Perhaps an option to take a whole line and add it verbatim would solve
> all these issues relatively cleanly.

Yes, but that's not how the user(8) utility works, sad to say.  I
suspect that you might get further with an

	env EDITOR=ed vipw < ed-script && pwd_mkdb

combination of steps, rather than trying to modify user.c.

Regards,
Alistair