Table of Contents
TODO Docker for non-root
Docker for non-root
Creating
Create user account with his/her home directory content copied
from /etc/skel
(-m
) and default shell (-s /usr/bin/bash
):
username=mikdat
sudo useradd -m -s /usr/bin/bash $username
# set password for username
sudo passwd $username
# add user to a docker group
sudo usermod -a -G docker $username
# check the groups that user is assigned to
sudo groups $username
# change context to username and check if everything is ok on his/her side
su - $username
Deleting
username=jakmat
userdel $username
# or delete user and its home directory and mail directory
userdel -r $username