You are not logged in.

#1 2011-07-29 13:34:52

Camus
Member
Registered: 2011-07-03
Posts: 71

Why doesn't 'groups' list all the groups I'm in

When I create a new group and add myself to that group as superuser, command 'groups' doesn't list that group among others. It lists just those that I've been initially in (when creating my user via 'adduser'). Example:

# groupadd [group]
# gpasswd -a [user] [group] /OR/ usermod -G [group] [user]
# exit
$ groups

The group and only this group is visible if I do this (besides uid, gid and groups values):

# id [user]

Offline

#2 2011-07-29 13:36:57

guelfi
Member
From: /home/guelfi
Registered: 2011-07-01
Posts: 111

Re: Why doesn't 'groups' list all the groups I'm in

AFAIR, you have to logout and login again for group changes to have an effect. Have you tried this yet?

Offline

#3 2011-07-29 14:07:44

Camus
Member
Registered: 2011-07-03
Posts: 71

Re: Why doesn't 'groups' list all the groups I'm in

Oops. Thanks for the help!

Offline

#4 2011-07-29 14:16:43

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Why doesn't 'groups' list all the groups I'm in

and ...
using the usermod-command, you need the -a option, ie

usermod -a -G {group} {user}

Otherwise you will only have the given {group} in addition to your default group.

Offline

#5 2011-07-29 16:07:49

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Why doesn't 'groups' list all the groups I'm in

There is also newgrp if you don't want to/can not log out/in


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB