social.sokoll.com

I' having a little 'technical' #problem while #adding #users to a @group on a #Lubuntu #server.
Here's the puzzling thing (to me):
mc@Lubuntu1:~$ groups 
mc adm cdrom sudo dip plugdev lpadmin sambashare shared 
mc@Lubuntu1:~$ groups mc 
mc :  mc adm cdrom sudo dip plugdev lpadmin sambashare shared common

See the difference?
I cannot understand why the group "common" does not appear with the first command.
Perhaps someone more experienced than me with linux/ubuntu knows why this is happening?
Thanks in advance for any help.
If you just added yourself to the group, you need a new shell before it will show up in the second command.
Thanks Brad.
I restarted bash, changed to zsh and tried, loged out and in again, and awkwardly it only showed all groups for user "mc" with the simple command "groups" after I restarted the server. And, more important, allowed user "mc" to create new files / edit other files without using the "su - mc".
(Should I have cleaned bash history also before restart it?)
Note that output of groups alone is NOT the same as groups <username>. The latter re-reads the groups database, which has been changed here:
GROUPS(1)                               User Commands                              GROUPS(1) 

NAME 
       groups - print the groups a user is in 

SYNOPSIS 
       groups [OPTION]... [USERNAME]... 

DESCRIPTION 
       Print  group  memberships  for each USERNAME or, if no USERNAME is specified, for the 
       current process (which may differ if the groups database has changed).

(From Debian.)

As @Brad Koehn ☑️ notes, changes to the groups database (usually /etc/groups, though se nsswitch.conf for other options) do not affect extant logins. You'll need to log out and back in, or run the newgrp command.
@Doc Edward Morbius I keep forgetting that Linux has man pages, that I should always start to read. Thanks for reminding it.
@manuelcaeiro@diasp.org Yeah, in this case I was aware of the classic "groups don't update on current session" snag, but not the groups command's behaviour, thouh the fact you'd invoked it differently had jumped out.