bashCopy code
su - psigurd
sudo ls /
bashCopy code
sudo usermod -aG adminusers username
bashCopy code
sudo usermod -aG adminroot psigurd
bashCopy code
getent passwd
plaintextCopy code
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
...
bashCopy code
cut -d: -f1 /etc/passwd
bashCopy code
getent group
plaintextCopy code
root:x:0:
daemon:x:1:
...
bashCopy code
cut -d: -f1 /etc/group
bashCopy code
getent group groupname
bashCopy code
sudo usermod -aG sudo vboxuser
bashCopy code
sudo visudo
plaintextCopy code
# User privilege specification
root ALL=(ALL:ALL) ALL
plaintextCopy code
vboxuser ALL=(ALL:ALL) ALL
bashCopy code
su - vboxuser # switch to vboxuser
sudo ls / # try to list the root directory