Subject: smmsp update on binary upgrade; useradd usage hint requested
To: None <current-users@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: current-users
Date: 06/25/2004 16:48:41
I did a binary upgrade from february current to yesterdayish 2.0BETA,
using an ISO I built myself (with local changes in the tree).  Almost
everything went perfectly.

I note that the paradign for /etc has changed, and it's much nicer
now.  On upgrade, not doing much resulted in an ok system, and I
merged in changes (using my own tool that's like etcupdate).

The only wrinkle was that user/group smmsp didn't end up in
/etc/master.passwd. and /etc/group.  I wrote a script to aid in this,
mostly to grok useradd, since I don't have lots of such machines:

----------------------------------------
#!/bin/sh

fixup-smmsp () {
if egrep smmsp /etc/group > /dev/null; then
  true
else
  groupadd -g 17 smmsp
fi
if egrep smmsp /etc/master.passwd > /dev/null; then
  true
else
  useradd -u 17 -g smmsp -c 'Sendmail Message Submission Program' -d /nonexistent -p \* -s /sbin/nologin smmsp
fi
}

fixup-smmsp
----------------------------------------

useradd complains about the homedir being missing, and doesn't provide
(that I can see in the man page) an option to not whine.  Also, I
didn't find an option to set the passwd to *.  Perhaps a 'system user'
argument that would do these things.  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.

Then, binary upgrades could just add new users/groups.

I tried to read the pkgsrc mkfiles to understand how PKG_USERS gets
transformed into useradd calls, since my quagga user has a pwd of '*',
but I was unable to figure it out.

For the reccord, 2.0BETA and up-to-date xsrc runs just fine (with apm)
on an IBM T30 2366-97U.  My CD failed to boot on a Thinkpad 600E, but
the cdrom on the 600 series is odd - I'm not sure that netbsd has ever
booted from cdrom on those.

-- 
        Greg Troxel <gdt@ir.bbn.com>