Linux useradd + secondary groups

I can never remember the exact syntax for setting up a new user. For reference:

groupadd webdev
useradd lars -g webdev
passwd lars
usermod -a -G wheel lars # -a = append to secondary groups

Leave a Reply