[Adduser-devel] Bug#874560: Two errors in deluser(8) and flaws in adduser(8), adduser.conf(5) and deluser.conf(5)

Markus Hiereth post at hiereth.de
Thu Sep 7 10:11:30 UTC 2017


Package: adduser
Version: 3.116
Severity: normal

Dear Maintainer,

following the correction of a bug in the german manual pages to
adduser and deluser
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685529), the german
translation team noted that the formatting of the four manual pages is
not in accordance with the guidelines man-pages(7).

Together with this bugreport, four groff files with correct formatting
of options, arguments, files-names etc. are passed to your team.

To make it easier to find out what has been changed, You will find as
well commented diff-files. The changes are summarized below. 

To illustrate the results, the manual pages emerging from the source
code files are attached as well as pdf files.

In principle, I am ready to continue this piece of work by making the
subsequent changes in the related german po file.

Best regards
Markus Hiereth

---------------------------------------------------------------------

1. Information related to all manual page files

1.a) Changes

First line in groff source code that tells emacs that this is a groff
source file has been erased
(.\" Hey, Emacs!  This is an -*- nroff -*- source file.)

The input for the title macro .TH did not conform with man-pages(7)
which asks for " .TH title section date source manual".
Input was changed.

In the input for the title macro .TH a variable VERSION appears.
Maybe there is a script that replaces this by the actual value.
In the files sent, the version number 3.116 appears


1.b) For your interest

In groff source file, now all phrases begin in a new line according
to man-pages(7).

Consider usage of the macros .SY, .OP and .YS in section "Synopsis"
as presented in groff_man(7)

Check whether it is necessary to use the groff code for the character
minus (dash preceeded by a backslash, i.e. \-) within options that
consist of more than one word:
  \-\-remove\-home   versus   \-\-remove-home

There is no Section "Copyright" listed in man-pages(7)
Consider putting these information only as comment in the groff source file



2. Information related to adduser manual page
see attached adduser_3.8, adduser.8_c.diff

2.a) Changes

As suggested in bug report #846242, short options according
to output of --help have been added

"GIDS" has been replaced by "GIDs" as this is the plural of GID


2.b) for your interest

Consider using either "gecos" or "GECOS" troughout the document.



3. Information related to the deluser manual page
see attached deluser_3.8, deluser.8c.diff

3.a) Changes

Short options introduced according to bug report #846242

The notation for backup file names in the section "Options"
(with slashes and $-sign was strange and/or wrong and
differed from the one used in section "Description" and in
deluser.conf(5). Therefore, notation was unified.

The obligatory argument to the option --backup-to was missing and has
been introduced in the text. In section "Description" it was stated
that, by default, the backup file will appear in the current directory,
which is in contradiction to "/" in the explanation of option
--backup-to.


3.b) For your interest

Slight changes in the explanation of the options --remove-home and
--remove-all-files

Formatting with sequences \fI...\fR inside a .BR macro has been done
as three font styles are needed sometimes

The option --force does not appear the section "Options". Consider to
introduce it in the list of options.

Has 'perl modules' in section "Return values" to be replaced with
'perl' according to a changelog entry for Version 3.116?


4. Information related to adduser.conf manual page
see attached adduser.conf_3.5, adduser.conf.5_c.diff

I see no reason for square brackets to appear in the path of home
directories in case GROUPHOMES = true. They have been erased.


5. Information related to deluser.conf manual page
see attached deluser.conf_3.5, deluser.conf.5_c.diff

Explanation to NAME_REGEX has been made shorter and more simple


Best regards
Markus Hiereth

---------------------------------------------------------------------------

-- System Information:

Debian Release: 9.1
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'stable'), (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 4.9.0-3-686-pae (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages adduser depends on:
ii  debconf [debconf-2.0]  1.5.61
ii  passwd                 1:4.4-4.1

adduser recommends no packages.

Versions of packages adduser suggests:
ii  liblocale-gettext-perl  1.07-3+b1
ii  perl                    5.24.1-3+deb9u1

-- debconf information excluded
-------------- next part --------------
.\" Copyright 1997, 1998, 1999 Guy Maor.
.\" Adduser and this manpage are copyright 1995 by Ted Hajek,
.\" With much borrowing from the original adduser copyright 1994 by
.\" Ian Murdock.
.\" 
.\" This is free software; see the GNU General Public License version
.\" 2 or later for copying conditions.  There is NO warranty.
.\" annotation mh 2017-09-03: Phrases begin in a new line according
.\" to man-pages(7)
.\" annotation mh 2017-09-03: title conforms to man-pages(7)
.TH ADDUSER 8 2017-09-05 "adduser 3.116"
.\" annotation mh 2017-09-03: title does not conform to man-pages(7)
.\" .TH title section date source manual
.\".TH ADDUSER 8 "Version VERSION" "Debian GNU/Linux"
.SH NAME
adduser, addgroup \- add a user or group to the system
.SH SYNOPSIS
.\" annotation mh 2017-09-03: consider usage of macro .SY, .OP and .YS
.\" as presented in groff_man(7)
.BI "adduser [options] [\-\-home "dir "] [\-\-shell "shell "] [\-\-no-create-home] [\-\-uid "ID "] [\-\-firstuid "ID "] [\-\-lastuid "ID "] [\-\-ingroup "group " | \-\-gid "ID "] [\-\-disabled-password] [\-\-disabled-login] [\-\-gecos "GECOS "] [\-\-add_extra_groups] "user
.PP
.BI "adduser  \-\-system [options] [\-\-home "dir "] [\-\-shell "shell "] [\-\-no-create-home] [\-\-uid "ID "] [\-\-group | \-\-ingroup "group " | \-\-gid "ID "] [\-\-disabled-password] [\-\-disabled-login] [\-\-gecos "GECOS "] "user
.PP
.BI "addgroup  [options] [\-\-gid "ID "] "group
.PP
.BI "addgroup  \-\-system [options] [\-\-gid "ID "] "group
.PP
.BI "adduser  [options] "user " "group
.SS COMMON OPTIONS
.br
.\" annotation mh 2017-09-03: as suggested in bug report #846242
.\" short options according to output of --help added
.BI "[\-\-quiet|\-q] [\-\-debug|\-d] [\-\-force-badname] [\-\-help|\-h] [\-\-version] [\-\-conf "file "|\-c "file "]"
.SH DESCRIPTION
.PP
\fBadduser\fR and \fBaddgroup\fR add users and groups to the system
according to command line options and configuration information in
\fI/etc/adduser.conf\fR.
They are friendlier front ends to the low level tools like 
\fBuseradd\fR, \fBgroupadd\fR and \fBusermod\fR programs,
by default choosing Debian policy conformant UID and GID values, 
creating a home directory with skeletal configuration, running a custom 
script, and other features.
\fBadduser\fR and \fBaddgroup\fR can be run in one of five modes:
.SS "Add a normal user"
If called with one non-option argument and without the
\fB\-\-system\fR or \fB\-\-group\fR  options, \fBadduser\fR
will add a normal user.

\fBadduser\fR will choose the first available UID from the
range specified for normal users in the configuration file.
The UID can be overridden with the \fB\-\-uid\fR option.

The range specified in the configuration file may be overridden with the
\fB\-\-firstuid\fR and \fB\-\-lastuid\fR options.

By default, each user in Debian GNU/Linux is given a corresponding
group with the same name.
Usergroups allow group writable directories to be easily maintained
by placing the appropriate users in the new group, setting the
set-group-ID bit in the directory, and ensuring that all users
use a umask of 002.
If this option is turned off by setting \fBUSERGROUPS\fR
to \fIno\fR, all users' GIDs are set to \fBUSERS_GID\fR.
Users' primary groups can also be overridden from the command
line with the \fB\-\-gid\fR  or \fB\-\-ingroup\fR options
to set the group by id or name, respectively.
Also, users can be added to one or more groups defined in
\fIadduser.conf\fR either by setting \fBADD_EXTRA_GROUPS\fR
to 1 in \fIadduser.conf\fR, or by passing \fB\-\-add_extra_groups\fR 
on the commandline.

\fBadduser\fR will create a home directory subject to
\fBDHOME\fR, \fBGROUPHOMES\fR, and \fBLETTERHOMES\fR.
The home directory can be overridden from the command line with the
\fB\-\-home\fR option, and the shell with the \fB\-\-shell\fR
option.
The home directory's set-group-ID bit is set if \fBUSERGROUPS\fR
is \fIyes\fR so that any files created in the user's home
directory will have the correct group.

\fBadduser\fR will copy files from \fBSKEL\fR
.\" annotation mh 2017-09-03: "gecos" or "GECOS" troughout the document?
into the home directory and prompt for finger (gecos) information and
a password.  The gecos may also be set with the \fB\-\-gecos\fR
option.
With the \fB\-\-disabled-login\fR option, the account will be created
but will be disabled until a password is set.
The \fB\-\-disabled-password\fR option will not set a password,
but login is still possible (for example with SSH RSA keys).

If the file \fI/usr/local/sbin/adduser.local\fR exists,
it will be executed after the user account has been set
up in order to do any local setup.
The arguments passed to \fBadduser.local\fR are:
.br
\fIusername uid gid home-directory\fR
.PP 
The environment variable \fBVERBOSE\fR is set according
to the following rule:
.TP 
0
if  \fB\-\-quiet\fR is specified
.TP 
1
if neither \fB\-\-quiet\fR nor \fB\-\-debug\fR is specified
.TP 
2
if \fB\-\-debug\fR is specified
.PP
(The same applies to the variable \fBDEBUG\fR, but
\fBDEBUG\fR is deprecated and will be removed in a later
version of \fBadduser\fR.)

.SS "Add a system user"
If called with one non-option argument and the \fB\-\-system\fR
option, \fBadduser\fR will add a system user.
If a user with the same name already exists in the system uid
range (or, if the uid is specified, if a user with that
uid already exists), \fBadduser\fR will exit with a warning.
This warning can be suppressed by adding \fB\-\-quiet\fR.

\fBadduser\fR will choose the first available UID from the range
specified for system users in the configuration file
(\fBFIRST_SYSTEM_UID\fR and \fBLAST_SYSTEM_UID\fR).
If you want to have a specific UID, you can specify it using the
\fB\-\-uid\fR option.

By default, system users are placed in the
\fBnogroup\fR group.
To place the new system user in an already existing group, use
the \fB\-\-gid\fR or \fB\-\-ingroup\fR options.
To place the new system user in a new group with the same ID, use
the \fB\-\-group\fR option.

A home directory is created by the same rules as for normal users.
The new system user will have the shell \fI/usr/sbin/nologin\fR
(unless overridden with the \fB\-\-shell\fR option),
and have logins disabled.
Skeletal configuration files are not copied.
.SS "Add a user group"
If \fBadduser\fR is called with the \fB\-\-group\fR option and
without the \fB\-\-system\fR option, or \fBaddgroup\fR is called
respectively, a user group will be added.

.\" annotation mh 2017-09-03: GIDS replaced by GIDs as elsewhere with
.\" plural of UID and GID
A GID will be chosen from the range specified for system GIDs in the
configuration file (\fBFIRST_GID\fR, \fBLAST_GID\fR).
To override that mechanism you can give the GID using the
\fB\-\-gid\fR option.

The group is created with no users.
.SS "Add a system group"
If \fBaddgroup\fR is called with the \fB\-\-system\fR option,
a system group will be added.

.\" annotation mh 2017-09-03: GIDS replaced with GIDs as elsewhere with
.\" plural of UID and GID
A GID will be chosen from the range specified for system GIDs in the
configuration file (\fBFIRST_SYSTEM_GID\fR, \fBLAST_SYSTEM_GID\fR).
To override that mechanism you can give the GID using the
\fB\-\-gid\fR option.
The group is created with no users.

.SS "Add an existing user to an existing group"
If called with two non-option arguments, \fBadduser\fR
will add an existing user to an existing group.

.SH OPTIONS
.TP
.BR "\-c \fIfile", "\-\-conf \fIfile" 
Use \fIfile\fR instead of \fI/etc/adduser.conf\fR.
.TP
.B \-\-disabled-login
Do not run passwd to set the password.
The user won't be able to use her account until the password is set.
.TP
.B \-\-disabled-password
Like \fB\-\-disabled-login\fR, but logins are still possible
(for example using  SSH RSA keys) but not using password authentication.
.TP
.B \-\-force\-badname
By default, user and group names are checked against the configurable
regular expression \fBNAME_REGEX\fR specified in the configuration file.
This option forces \fBadduser\fR and \fBaddgroup\fR to apply only a
weak check for validity of the name.
\fBNAME_REGEX\fR is described in
.BR adduser.conf (5).
.TP
.BI \-\-gecos " GECOS "
Set the gecos field for the new entry generated.
\fBadduser\fR will not ask for finger information if this option is given.
.TP
.BI \-\-gid " ID "
When creating a group, this option forces the new groupid to be the
given number.
When creating a user, this option will put the user in that group.
.TP
.B \-\-group
When combined with \fB\-\-system\fR , a group with the same name
and ID as the system user is created.
If not combined with \fB\-\-system\fR , a group with the given name
is created.
This is the default action if the program is invoked as \fBaddgroup\fR.
.TP
.BR \-h ", " \-\-help
Display brief instructions.
.TP
.BI \-\-home " dir "
Use \fIdir\fR as the user's home directory, rather than the default
specified by the configuration file.
If the directory does not exist, it is created and skeleton files are copied.
.TP
.BI \-\-shell " shell "
Use \fIshell\fR as the user's login shell, rather than the default specified
by the configuration file.
.TP
.BI \-\-ingroup " group "
Add the new user to \fIgroup\fR instead of a usergroup or the
default group defined by \fBUSERS_GID\fR in the configuration file.
This affects the users primary group.
To add additional groups, see the \fBadd_extra_groups\fR option.
.TP
.B \-\-no-create-home
Do not create the home directory, even if it doesn't exist.
.TP
.BR \-q ", " \-\-quiet
Suppress informational messages, only show warnings and errors.
.TP
.BR  \-d ", " \-\-debug
Be verbose, most useful if you want to nail down a problem
with \fBadduser\fR.
.TP
.B \-\-system
Create a system user or group.
.TP
.BI \-\-uid  " ID "
Force the new userid to be the given number.
\fBadduser\fR will fail if the userid is already taken.
.TP
.BI \-\-firstuid " ID "
Override the first uid in the range that the uid is chosen from (overrides
\fBFIRST_UID\fR specified in the configuration file).
.TP
.BI \-\-lastuid " ID "
Override the last uid in the range that the uid is chosen from
(\fBLAST_UID\fR).
.TP
.B \-\-add_extra_groups
Add new user to extra groups defined in the configuration file.
.TP
.BR \-v " , " \-\-version
Display version and copyright information.

.SH EXIT VALUES

.TP
.B 0 
The user exists as specified.
This can have 2 causes:
The user was created by
\fBadduser \fR or the user was already present on the system before
\fBadduser \fR was invoked.
If \fBadduser \fR was returning 0, invoking \fBadduser \fR a second
time with the same parameters as before also returns 0.
.TP
.B 1
Creating the user or group failed because it was already present with
other UID/GID than specified.
The username or groupname was rejected because of a mismatch with the
configured regular expressions, see
.BR adduser.conf (5).
\fBadduser \fR has been aborted by a signal.
.br
Or for many other yet undocumented reasons which are printed
to console then.
You may then consider to remove \fB\-\-quiet\fR to make
\fBadduser \fR more verbose.

.SH FILES
.TP 
.I /etc/adduser.conf
Default configuration file for \fBadduser\fR and \fBaddgroup\fR
.TP
.I /usr/local/sbin/adduser.local
Optional custom add-ons.

.SH "SEE ALSO"
.BR adduser.conf (5), 
.BR deluser (8), 
.BR groupadd (8), 
.BR useradd (8), 
.BR usermod (8),
Debian Policy 9.2.2.

.\" annotation mh 2017-09-03: Section COPYRIGHT is not listed in man-pages(7)
.\" authors and copyright information shall appear as a comment
.\" in the source file 
.SH COPYRIGHT
Copyright (C) 1997, 1998, 1999 Guy Maor. Modifications by Roland
Bauerschmidt and Marc Haber. Additional patches by Joerg Hoh and Stephen Gran.
.br
Copyright (C) 1995 Ted Hajek, with a great deal borrowed from the original
Debian  \fBadduser\fR
.br
Copyright (C) 1994 Ian Murdock.
\fBadduser\fR is free software; see the GNU General Public Licence
version 2 or later for copying conditions.
There is \fIno\fR warranty.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adduser.8_c.diff
Type: text/x-diff
Size: 18538 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20170907/46ebdd3f/attachment-0004.diff>
-------------- next part --------------
.\" Copyright 1997, 1998, 1999 Guy Maor.
.\" Adduser and this manpage are copyright 1995 by Ted Hajek,
.\" With much borrowing from the original adduser copyright 1994 by
.\" Ian Murdock.
.\" 
.\" This is free software; see the GNU General Public License version
.\" 2 or later for copying conditions.  There is NO warranty.
.\" annotation mh 2017-09-03: title does not accord with man-pages(7)
.\".TH DELUSER 8 "Version VERSION" "Debian GNU/Linux"
.TH DELUSER 8 2017-09-05 "adduser 3.116"
.SH NAME
deluser, delgroup \- remove a user or group from the system
.SH SYNOPSIS
.\" annotation mh 2017-09-03: Is it necessary to use a backslash within
.\" the options that consist of more than one word, i.e.
.\" \-\-remove\-home instead of \-\-remove-home?
.\" annotation mh 2017-09-03: Consider the use of .SY, .OP, .YS
.\" macro as presented groff_man(7) here
.BI "deluser  [options] [\-\-force] [\-\-remove-home] [\-\-remove-all-files] [\-\-backup] [\-\-backup-to " dir "] "user
.PP
.BI "deluser  \-\-group [options] "group
.br
.BI "delgroup  [options] [\-\-only-if-empty] "group
.PP
.BI "deluser  [options] " "user group"
.SS COMMON OPTIONS
.br
.\" annotation mh 2017-09-03: short options introduced according to
.\" bug report #846242
.BI "[\-\-quiet|\-q] [\-\-system] [\-\-help|\-h] [\-\-version] [\-\-conf "file "|\-c "file "] "
.SH DESCRIPTION
.PP
\fBdeluser\fR and \fBdelgroup\fR remove users and groups from the system
according to command line options and configuration information in
\fI/etc/deluser.conf\fR and \fI/etc/adduser.conf\fR.
They are friendlier front ends to the \fBuserdel\fR and \fBgroupdel\fR
programs, removing the home directory as option or even all files on the system
owned by the user to be removed, running a custom script, and other features.
\fBdeluser\fR and \fBdelgroup\fR can be run in one of three modes:
.SS "Remove a normal user"
If called with one non-option argument and without the \fB\-\-group\fR option,
\fBdeluser\fR will remove a normal user.

By default, \fBdeluser\fR will remove the user without removing the home
directory, the mail spool  or any other files on the system owned by the user.
Removing the home directory and mail spool can be achieved using the
\fB\-\-remove-home\fR option. 

The  \fB\-\-remove-all-files\fR option removes all files on the system
owned by the user.
Note that if you activate both options \fB\-\-remove-home\fR will have
no effect because all files including the home directory and mail
spool are already covered by the \fB\-\-remove-all-files\fR option.

If you want to backup all files before deleting them you can activate the
\fB\-\-backup\fR option which will create a file \fIusername.tar(.gz|.bz2)\fR
in the directory specified by the \fB\-\-backup-to\fR option
(defaulting to the current working directory).
Both the remove and backup options can also be activated for default
in the configuration file \fI/etc/deluser.conf\fR.
See
.BR deluser.conf (5)
for details.

If you want to remove the root account (uid 0), then use the 
\fB\-\-force\fR parameter; this may prevent to remove the root
user by accident.

If the file \fI/usr/local/sbin/deluser.local\fR exists,
it will be executed after the user account has been removed
in order to do any local cleanup.
The arguments passed to \fBdeluser.local\fR are:
.br
.I "username uid gid home-directory"

.SS "Remove a group"
If \fBdeluser\fR is called with the \fB\-\-group\fR  option, or
\fBdelgroup\fR is called, a group will be removed.

Warning: The primary group of an existing user cannot be removed.

If the option \fB\-\-only-if-empty\fR is given, the group
won't be removed if it has any members left.

.SS "Remove a user from a specific group"
If called with two non-option arguments, \fBdeluser\fR
will remove a user from a specific group.
.SH OPTIONS
.TP
.\" annotation mh 2017-09-03: short option introduced according to
.\" bug report #846242
.\" annotation mh 2017-09-03: Formatting inside .BR macro with \fI..\fR due to
.\" the request for a comma in Roman font. macro just suits for two
.\" font styles
.BR "\-\-conf \fIfile",  "\-c \fIfile\fR" 
Use \fIfile\fR instead of the default files \fI/etc/deluser.conf\fR
and \fI/etc/adduser.conf\fR.
.\" annotation mh 2017-09-03: --force has been omitted in this list of options
.TP
.B \-\-group
Remove a group. This is the default action if the program is invoked
as \fIdelgroup\fR.
.TP
.\" annotation mh 2017-09-03: short option introduced according to
.\" bug report #846242
.BR \-\-help ", "\-h
Display brief instructions.
.TP
.\" annotation mh 2017-09-03: short option introduced according to
.\" bug report #846242
.B \-\-quiet, \-q
Suppress progress messages.
.TP
.B \-\-system
Only delete if user/group is a system user/group. This avoids
accidentally deleting non-system users/groups. Additionally, if the
user does not exist, no error value is returned. This option is mainly
for use in Debian package maintainer scripts.
.TP
.B \-\-only-if-empty 
Only remove if no members are left.
.TP
.\" annotation mh 2017-09-03: The notation for the backup files  
.\" (with slashes and $-sign differs from the one used
.\" in section DESCRIPTION here and in deluser.conf(5)
.\" Thus, notation unified:
.B \-\-backup
Backup all files contained in the userhome and the mailspool-file
to a file named \fIusername.tar.bz2\fR or \fIusername.tar.gz\fR.
.TP
.\" annotation mh 2017-09-03: argument to this option was missing
.BI "\-\-backup-to "dir
.\" annotation mh 2017-09-03: Above in Section Description it was stated that
.\" the backup file will appear in the current directory, i.e. ./
Place the backup files not in the current directory but in \fIdir\fR.
This implicitly sets \fB\-\-backup\fR also.
.\" annotation mh 2017-09-03: to show differences and similarities
.\" of the two following options more clearly, give each annotation
.\" according to relations to other options one paragraph.
.TP
.B \-\-remove-home
Remove the home directory of the user and its mailspool.
If \fB\-\-backup\fR is specified, the files are deleted after
having performed the backup.
.TP
.B \-\-remove-all-files
Remove all files from the system owned by this user.
If \fB\-\-backup\fR is specified, the files are deleted after
having performed the backup.
Note: \fB\-\-remove-home\fR does not have an effect any more.
.TP
.B \-\-version
Display version and copyright information.
.SH "RETURN VALUE"
.TP
.B 0
The action was successfully executed.
.TP
.B 1
The user to delete was not a system account.
No action was performed.
.TP
.B 2
There is no such user.
No action was performed.
.TP
.B 3
There is no such group.
No action was performed.
.TP
.B 4
Internal error.
No action was performed.
.TP
.B 5
The group to delete is not empty.
No action was performed.
.TP
.B 6
The user does not belong to the specified group.
No action was performed.
.TP
.B 7
You cannot remove a user from its primary group.
No action was performed.
.TP
.\" annotation mh 2017-09-05: Has 'perl modules' to be replaced with
.\" 'perl' according to changelog entry for Version 3.116, i.e. write
.\" The required package "perl" is not installed.
.B 8
The required perl-package 'perl modules' is not installed.
This package is required to perform the requested actions.
No action was performed.
.TP
.B 9
For removing the root account the parameter \fB\-\-force\fR
is required.
No action was performed.

.SH FILES
.TP
.IR /etc/deluser.conf
Default configuration file for \fBdeluser\fR and \fBdelgroup\fR
.TP
.IR /usr/local/sbin/deluser.local
Optional custom add-ons.

.SH "SEE ALSO"
.BR adduser (8),
.BR deluser.conf (5),
.BR groupdel (8),
.BR userdel (8)

.\" annotation mh 2017-09-03: Section COPYRIGHT is not listed in man-pages(7)
.\" authors and copyright information shall appear as a comment
.\" in the source file 
.SH COPYRIGHT
Copyright (C) 2000 Roland Bauerschmidt. Modifications (C) 2004
Marc Haber and Joerg Hoh.
This manpage and the \fBdeluser\fR program are based on \fBadduser\fR which is:
.br
Copyright (C) 1997, 1998, 1999 Guy Maor.
.br
Copyright (C) 1995 Ted Hajek, with a great deal borrowed from the original
Debian \fBadduser\fR
.br
Copyright (C) 1994 Ian Murdock.
\fBdeluser\fR is free software; see the GNU General Public Licence
version 2 or later for copying conditions.  There is \fIno\fR warranty.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deluser.8_c.diff
Type: text/x-diff
Size: 8604 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20170907/46ebdd3f/attachment-0005.diff>
-------------- next part --------------
.\" Hey, Emacs!  This is an -*- nroff -*- source file.
.\" Adduser and this manpage are copyright 1995 by Ted Hajek
.\"
.\" This is free software; see the GNU General Public Lisence version 2
.\" or later for copying conditions.  There is NO warranty.
.\" annotation mh 2017-09-03: This title does not conform to man-pages(7)
.\" .TH title section date source manual
.\".TH "adduser.conf" 5 "Version VERSION" "Debian GNU/Linux"
.TH ADDUSER.CONF 5 2017-09-05 "adduser 3.116"

.SH NAME
/etc/adduser.conf \- configuration file for 
.BR adduser (8) 
and 
.BR addgroup (8).
.SH DESCRIPTION
The file \fI/etc/adduser.conf\fR contains defaults for the programs
.BR adduser (8), 
.BR addgroup (8),
.BR deluser (8)
and 
.BR delgroup (8).
Each line holds a single value pair in the form \fIoption\fR = \fIvalue\fR.
Double or single quotes are allowed around the value, as is whitespace
around the equals sign.
Comment lines must have a hash sign (#) in the first column.

The valid configuration options are:
.TP
.B DSHELL
The login shell to be used for all new users.
Defaults to \fI/bin/bash\fR.
.TP
.B DHOME
The directory in which new home directories should be created.
Defaults to \fI/home\fR.
.TP
.B GROUPHOMES
If this is set to \fIyes\fR, the home directories will be created as
.\" annotation mh 2017-09-03: I do not see a reason for the square brackets
.\" in the path. Two reasons for omitting them: The font type italics
.\" indicates that this stands for a some name. In the notation for
.\" backup files in deluser(8) and deluser.conf(5) there are no square brackets .\" either username.tar.gz 
\fI/home/groupname/user\fR.
Defaults to \fIno\fR.
.TP
.B LETTERHOMES
If this is set to \fIyes\fR, then the home directories created will
have an extra directory inserted which is the first letter
of the loginname.
For example: \fI/home/u/user\fR.
Defaults to \fIno\fR.
.TP
.B SKEL
The directory from which skeletal user configuration files should be
copied.  Defaults to \fI/etc/skel\fR.
.TP
.BR FIRST_SYSTEM_UID " and " LAST_SYSTEM_UID
specify an inclusive range of UIDs from which system UIDs can be
dynamically allocated.
Default to \fI 100\fR - \fI999\fR.
Please note that system software, such as the users allocated by the
base-passwd package, may assume that UIDs less than 100 are unallocated.
.TP
.BR FIRST_UID " and " LAST_UID
specify an inclusive range of UIDs from which normal user's UIDs can
be dynamically allocated.
Default to \fI1000\fR - \fI59999\fR.
.TP
.BR FIRST_SYSTEM_GID " and " LAST_SYSTEM_GID
specify an inclusive range of GIDs from which system GIDs can be
dynamically allocated.
Default to \fI100\fR - \fI999\fR.
.TP
.BR FIRST_GID " and " LAST_GID
specify an inclusive range of GIDs from which normal group's GIDs can
be dynamically allocated.
Default to \fI1000\fR - \fI59999\fR.
.TP
.B USERGROUPS
If this is set to \fIyes\fR, then each created user will be given
their own group to use.
If this is \fIno\fR, then each created user will be placed in the group
whose GID is \fBUSERS_GID\fR (see below).
The default is \fIyes\fR.
.TP
.B USERS_GID
If \fBUSERGROUPS\fR is \fIno\fR, then \fBUSERS_GID\fR is the GID
given to all newly-created users.
The default value is \fI100\fR.
.TP
.B DIR_MODE
If set to a valid value (e.g. 0755 or 755), directories created will have
the specified permissions as umask.
Otherwise 0755 is used as default.
.TP
.B SETGID_HOME
If this is set to \fIyes\fR, then home directories for users with
their own group (\fBUSERGROUPS\fR = yes) will have the setgid bit set.
This was the default setting for \fBadduser\fR versions << 3.13.
Unfortunately it has some bad side effects, so we no
longer do this per default.
If you want it nevertheless you can still activate it here.
.TP
.B QUOTAUSER
If set to a nonempty value, new users will have quotas copied from
that user.
The default is empty.
.TP
.B NAME_REGEX
User and group names are checked against this regular expression.
If the name doesn't match this regexp, user and group creation in
\fBadduser\fR is refused unless \fB\-\-force-badname\fR is set.
With \fB--force-badname\fR set, only weak checks are performed.
The default is the most conservative ^[a-z][-a-z0-9]*$.
.TP
.B SKEL_IGNORE_REGEX
Files in \fI/etc/skel/\fR are checked against this regex, and not
copied to the newly created home directory if they match.
This is by default set to the regular expression matching files left over
from unmerged config files (dpkg-(old|new|dist)).
.TP
.B ADD_EXTRA_GROUPS
Setting this to something other than 0 (the default) will cause
\fBadduser\fR to add newly created non-system users to the list of
groups defined by  \fBEXTRA_GROUPS\fR (below).
.TP
.B EXTRA_GROUPS
This is the list of groups that new non-system users will be added to.
By default, this list is "dialout cdrom floppy audio video plugdev users games".
.SH NOTES
.TP
.B VALID NAMES
\fBadduser\fR and \fBaddgroup\fR enforce conformity to
IEEE Std 1003.1-2001, which allows only the following characters
to appear in group and user names: letters, digits, underscores,
periods, at signs (@) and dashes.
The name may not start with a dash.
The "$" sign is allowed at the end of usernames (to conform to samba).

An additional check can be adjusted via the configuration parameter
\fBNAME_REGEX\fR to enforce a local policy.

.SH FILES
.I /etc/adduser.conf
.SH SEE ALSO
.BR deluser.conf (5),
.BR addgroup (8), 
.BR adduser (8), 
.BR delgroup (8),
.BR deluser (8) 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adduser.conf.5_c.diff
Type: text/x-diff
Size: 7403 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20170907/46ebdd3f/attachment-0006.diff>
-------------- next part --------------
.\" Adduser and this manpage are copyright 1995 by Ted Hajek
.\"
.\" This is free software; see the GNU General Public Lisence version 2
.\" or later for copying conditions.  There is NO warranty.
.\"
.\" annotation mh 2017-09-03: .TH does not conform with man_pages(7)
.\".TH "deluser.conf" 5 "Version VERSION" "Debian GNU/Linux"
.TH DELUSER.CONF 5 2017-09-05 "adduser 3.116"
.SH NAME
/etc/deluser.conf \- configuration file for  \fBdeluser\fR(8) 
and \fBdelgroup\fR(8).
.SH DESCRIPTION
The file \fI/etc/deluser.conf\fR contains defaults for the programs
\fBdeluser\fR(8) and \fBdelgroup\fR(8).
Each option takes the form \fIoption\fR = \fIvalue\fR.
Double or single quotes are allowed around the value.  Comment lines
must have a hash sign (#) at the beginning of the line.

\fBdeluser\fR(8) and \fBdelgroup\fR(8) also read \fI/etc/adduser.conf\fR,
see \fBadduser.conf\fR(5); 
settings in \fIdeluser.conf\fR may overwrite settings made in 
\fIadduser.conf\fR.

The valid configuration options are:
.TP
.B REMOVE_HOME
Removes the home directory and mail spool of the user to be removed.
Value may be 0 (don't delete) or 1 (do delete).
.TP
.B REMOVE_ALL_FILES
Removes all files on the system owned by the user to be removed.
If this option is activated \fBREMOVE_HOME\fR has no effect.
Values may be 0 or 1.
.TP
.B BACKUP
If \fBREMOVE_HOME\fR or \fBREMOVE_ALL_FILES\fR is activated all
files are backuped before they are removed.
The backup file that is created defaults to \fIusername.tar(.gz|.bz2)\fR
in the directory specified by the \fBBACKUP_TO\fR option.
The compression method is chosen to the best that is available.
Values may be 0 or 1.
.TP
.B BACKUP_TO
If \fBBACKUP\fR is activated, \fBBACKUP_TO\fR specifies the
directory the backup is written to.
Default is the current directory.
.TP
.B NO_DEL_PATHS
A list of regular expressions, space separated.
.\" annotation mh 2017-09-03: "to be deleted" was mentioned several times
.\" in the phrase and difficult to understand
All files to be deleted in course of deleting the home directory or
user-owned files elsewhere are checked against each of these regular
expressions.

.\" annotation mh 2017-09-03: This phrase confuses as "leaving only" raises
.\" the question whether files in /home are left in the matching step
.\" and will be deleted or whether these files will be left, i.e.
.\" remain on the system. The latter would be strange. 
If a match is detected, the file is not deleted.
Default to a list of system directories, leaving only \fI/home\fR.
Therefore only files below \fI/home\fR belonging
to that specific user are going to be deleted.

.TP
.B ONLY_IF_EMPTY
Only delete a group if there are no users belonging to this group.
Defaults to 0.
.TP
.B EXCLUDE_FSTYPES
A regular expression which describes all file systems which should
be excluded when looking for files of a user to be deleted.
Defaults to "(proc|sysfs|usbfs|devpts|tmpfs|afs)".

.SH FILES
.I /etc/deluser.conf
.SH SEE ALSO
.BR adduser.conf (5), 
.BR delgroup (8), 
.BR deluser (8)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deluser.conf.5_c.diff
Type: text/x-diff
Size: 4595 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20170907/46ebdd3f/attachment-0007.diff>


More information about the Adduser-devel mailing list