This post describes multi user management method that I use in the lab. Since all the users require root privilege, it is better to have only one group with root privilege.
$ sudo groupadd --gid 2000 cglab
$ sudo useradd [username] -m $ sudo passwd [username] $ sudo usermod -a -G docker [username]
-m: Create home directory.
-a: Add the user to the supplementary group(s).
-G: A list of supplementary groups which the user is also a member of.
Add sudo group
We are giving root privilege for those of who are in the group
$ sudo visudo
Add following line:
... cglab ALL=(ALL) ALL
$ sudo usermod -a -G cglab [username]
in user account, type:
$ sudo usermod -g cglab [username]
-g: The group name or number of the user’s new initial login group.
(Optional) Change shell to zsh
Make sure to install zsh and oh-my-zsh first:
$ sudo apt-get install zsh
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
$ sudo vim /etc/passwd
add following end of line where [username] is: