[[!tag debian idea]]
Debian got squeeze released, and ideas are brewing for what to do during the next release cycle. Here's an idea I had lying around. I'm throwing it out there, since I won't have time to do anything about it for at least a little while, but perhaps someone else thinks it's a good idea? Or, better yet, you can all tell me in comments why this is a bad idea, or at least why it should be designed in a different way.
NAME
addsysuser, delsysuser - create and remove systems user in Debian pack‐
ages
SYNOPSIS
addsysuser [options] username
delsysuser [options] username
DESCRIPTION
addsysuser creates a system user, and delsysuser removes it. The pur‐
puse of these tools is to make it easier for Debian packages to create
and remove system users as the pacakges are installed and purged.
These are wrappers around adduser(8) and deluser(8).
addsysuser will create the system user, unless it already exists. If
the user already exists, it does nothing.
delsysuser removes the user. However, the system administrator may
configure it to never remove the user, or to remove only some users.
Use the /etc/adduser.conf for the settings:
DELETESYSTEMUSERS
Set to true or false depending on whether delsysuser should
remove the system user or not. Defaults to true.
OPTIONS
-p, --packagePACKAGE
Record the user as being used by a specific package. Many pack‐
ages can use the same user. delsysuser will only remove the
user when no packages are using it anymore.
--no-act
Only pretend to call adduser or deluser without actually doing
so. This allows easier testing of command lines.
FILES
/etc/adduser.conf
Configuration file for addsysuser and delsysuser.
EXAMPLE
In the postinst script:
addsysuser --package hello hellouser
In the postrm script:
delsysuser --package hello hellouser
SEE ALSO
adduser(8), deluser(8).