[Pkg-shadow-devel] Bug#779018: passwd: adding groups to a user with usermod: not possible

Bob Proulx bob at proulx.com
Mon Feb 23 18:38:26 UTC 2015


tags 779018 + unreproducible moreinfo
thanks

phamming wrote:
> I have some problems with usermod. The options -a returns the help
> screen, while it should append to the groups the user is belongs
> to. All other options work fine.

Thank you for report.  However I cannot reproduce the problem.  It
works fine for me.

  # id testuser
  uid=1002(testuser) gid=1002(testuser) groups=1002(testuser)
  # usermod -a -G testgroup testuser
  # id testuser
  uid=1002(testuser) gid=1002(testuser) groups=1002(testuser)1011(testgroup)


Unfortunately you did not include a test case showing exactly what you
did.  Please when submitting a bug report always include enough
information to reproduce the problem.  This includes the exact command
line you used.  I suspect that you are missing this part from the manual.

       -a, --append
           Add the user to the supplementary group(s). Use only with the -G option.

Are you using -a with -G?  If not then that will produce an option
error which will emit the online option help output.

> I don't know how long this problem exists, because I also use a
> different route to change group membership. Since this is the
> prefered way, it is important it is resolved.

I personally recommend using "useradd" to add users to groups.  The
syntax is:

  # adduser username groupname

> I don't know where this problem is introduced, if it is upstream or
> in Debian's sources.

Since I could not reproduce the problem I marked this as
unreproducable and moreinfo needed.  If you have a test case that
reproduces the problem please tell us exactly what command line you
used.

Thank you for helping to make Debian better.

Bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20150223/e38d7a78/attachment.sig>


More information about the Pkg-shadow-devel mailing list