[Adduser-devel] Bug#515909: despite man page claims, a warning is not shown.
Joerg Hoh
joerg at joerghoh.de
Wed Feb 18 20:06:50 UTC 2009
Hi all
On Wed, Feb 18, 2009 at 02:32:13AM -0800, shaul Karl wrote:
> Package: adduser
> Version: 3.110
> Severity: normal
>
> man page claims:
>
> If called with one non-option argument and the --system
> option, adduser 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), adduser
> will exit with a warning.
>
> and
>
> --quiet
> Suppress informational messages, only show warnings and
> errors.
>
> However this doesn't work for me. I do have an ftp user:
>
> # adduser --quiet --system ftp
> #
I just checked it against current version (line 351pp):
if (existing_user_ok($new_name, $new_uid) == 2) {
printf (gtx("The user `%s' already exists with a different UID. Exiting.\n"), $new_name) if $verbose;
exit 1;
}
We have a lot of message depending on $verbose, which is "1" by default,
unless switched to "0" by adding --quiet.
I am unsure how we should proceed with it. --quiet is used in scripts and
should prevent adduser from printing anything (at least that's my guess).
So we should keep this behaviour. Instead I suggest to enhance the manpage
to something like this:
--quiet
Suppress any message, including error and warnings. Use this
parameter only when you use adduser in other scripts.
Ok?
Jörg
--
What did you do to the cat? It looks half-dead. -Schroedinger's wife
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20090218/ce823362/attachment.pgp
More information about the Adduser-devel
mailing list