Some basic user and group management commands
List System Users
$ getent passwd | awk -F: '{ print $1}'
root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
proxy
www-data
backup
list
irc
gnats
nobody
systemd-network
systemd-resolve
systemd-timesync
messagebus
syslog
_apt
tss
uuidd
tcpdump
sshd
landscape
pollinate
martin
dnsmasq
nginx
bind
ntp
List groups
List the groups the current user is a member of
$ groups
adm sudo audio dip video plugdev netdev
Add user to group ‘docker’
$ sudo usermod -aG docker martin
# Appends user martin to group docker
sudo usermod -aG sudo newbie
# Adds user newbie to group sudo which makes it possible for the user to run commands as root aka 'sudo' aka
'Superuser Do'.
Pages: 1 2