change primary group of linux user code example Example: ubuntu change primary group $ usermod -g pserver pserver