Add user to existing group
in PHP
This is dead simple. I often need to add a new user to the sudoer group, "sudo" by default.
sudo usermod -a -G groupName userName
So for adding a user to the sudoers group.
sudo usermod -a -G sudo {username}