Users, Groups & Sudo
Root powers should be deliberate. Here’s the full picture on an AcreetionOS system.
Your current identity
whoami ; id ; groups # who you are + memberships
sudo whoami # tests admin path; expect 'root'
On AcreetionOS the installer puts your user into wheel, which sudoers allows to sudo.
Add another user
sudo useradd -m -G wheel,audio,video -s /bin/bash alice
sudo passwd alice # set initial password
-m creates /home/alice; group list matches common desktop needs. Give admin rights simply by keeping wheel in her groups.
Sudo configuration (done right)
Edit policy with the safe editor, never a raw text editor:
sudo visudo
Shipped-relevant lines look like:
%wheel ALL=(ALL:ALL) ALL # password required (default)
# %wheel NOPASSWD: ALL # leave commented unless you know why
Per-user command subsets go in /etc/sudoers.d/:
echo "alice ALL=(root) NOPASSWD: /usr/bin/timeshift" | \
sudo tee /etc/sudoers.d/alice-timeshift
sudo chmod 440 /etc/sudoers.d/alice-timeshift
visudo -cf /etc/sudoers.d/alice-timeshift # validate syntax!
A typo in sudoers can lock everyone out. Always edit via visudo/validate with -cf.
|
Disable / re-enable accounts
sudo usermod -L bob # lock password auth
sudo usermod -U bob # unlock
sudo passwd -l bob # alternative lock
getent passwd | cut -d: -f1 # enumerate users
Delete a user (and their files)
sudo userdel -r alice # -r removes /home/alice
Snapshot first per Timeshift — account deletion is instant and thorough.