Add a user to a group

To add a existing user to a group

usermod -a -G thegroup theuser

To add a user to a group when the user is created

useradd -G thegroup theuser