#1055312 adduser: "addgroup user group" is mentioned in man page but does not work anymore (ex bug 664869)

#1055312#5
Date:
2023-11-03 22:27:43 UTC
From:
To:
Dear Maintainer,
on my ap to date Debian Sid system

$ man addgroup # says
...

   Add an existing user to an existing group
       If called with two non-option arguments, adduser will add  an  existing
       user to an existing group.
...
$

but when I try to add a user to a group, this is what it happens

$ sudo addgroup donald ducks
[sudo] password for boffi:
fatal: addgroup with two arguments is an unspecified operation.
$

as far as I can tell, this was the outcome of bug 664869,
where the OP claimed that the two arguments call was not
mentioned in the man page.

It is mentioned, at least in my man page.

Regards ፨ gb

#1055312#10
Date:
2023-11-04 00:09:20 UTC
From:
To:
You should use:
$ sudo adduser donald ducks

Instead of trying to make `addgroup` do that.

#1055312#15
Date:
2023-11-04 16:14:04 UTC
From:
To:
adduser and addgroup share a man page, and the two-argument form is only
supported for adduser, not for addgroup, see SYNOPSIS in the manual
page.

And the text you quoted explicitly says that it is add_user_ that will
add an existing user to an existing group.

The message is correct, it is an unspecified operation according to the
SYNOPSIS.

Let me know what we can improve, but I think that everything is fine
here.

Greetings
Marc

#1055312#20
Date:
2023-12-27 22:47:41 UTC
From:
To:
This bug has been reported by multiple users across multiple bug reports.
It is functionality that has existed since 1995 and is well adopted and
expected in scripts and documentation (both the manpage and 3rd party). Fix
the manpage and revert the patch and accept that this is intended and
necessary functionality. Breaking something that has existed for 25 years
just because the documentation isn't as clear as you would like is not a
valid excuse.