How to change primary group

The usermod option -G adds supplementary groups. You want option -g to change the primary group. I.e. your command should have been:

# usermod -g pserver pserver

Note, this will also change group ownership of files in the home directory, but not elsewhere.

More generally, the syntax for changing user 'user' to have primary group 'group' is:

# usermod -g group user

Late, but a bit clear (at least for me);

sudo usermod -g <NewPrimaryGroupName> <TheTargetUserName>

And then check id

id <TheTargetUserName>

More details here: http://manpages.ubuntu.com/manpages/precise/man8/usermod.8.html

Credits: http://www.htpcbeginner.com/safely-change-primary-group-group-in-linux/

Thank for reply.