[CentOS] I added my user to a group last week, and now the user isn't in the group

Sun Oct 23 13:49:50 UTC 2016
Richard <lists-centos at listmail.innovate.net>


> Date: Sunday, October 23, 2016 19:51:02 +0800
> From: Xuwen Fang <fxuwen at gmail.com>
> To: CentOS mailing list <centos at centos.org>
>
> Hello everyone,
> 
> I added my user account to a group called "www-pub" for easier
> manipulations on web files on my server. And today I found that my
> account was not in the group "www-pub" any longer.....
> What I did to add my account to the group is like "sudo usermod -a
> -G www-pub myaccount". Is there anything wrong?
> 
> Thanks for any suggestions.
> 
> Sincerely,
> Xuwen

After issuing that command did you check the /etc/group and
/etc/gshadow files to confirm that the command was successful? And,
have you looked there now? Have you checked/compared the
system-generated "~"  backups?

Assuming you were successfully added, and the entries aren't there
now, have reviewed the /var/log/secure log for subsequent actions
that would have reversed that? [realizing of course that the password
and group files can be hand-edited.]

What are the modified timestamps on those two group files (and their
system-generated backups) relative to when you issued that command?