Archives

All posts for the month April, 2015

Source

useradd example – Add a new user to primary group

To add a user tony to group developers use the following command:
# useradd -g developers tony
# id tony

Sample outputs:

uid=1123(tony) gid=1124(developers) groups=1124(developers)

Please note that small g (-g) option add user to initial login group (primary group). The group name must exist. A group number must refer to an already existing group.

Continue Reading