Your server has more users than you think. In this episode you'll learn the difference between root and a regular user, what's inside /etc/passwd, how to create users and switch between them, how groups make permissions easy, and how sudo really works: who can use it, how to grant it safely with visudo, and why you should never stay logged in as root.
⏱ Chapters
0:00 More users than you think
0:20 root vs. a regular user
0:39 whoami & id
0:56 /etc/passwd explained
1:22 Creating users: adduser & su
1:45 Groups: groupadd & usermod -aG
2:13 How sudo works
2:36 Giving sudo rights & visudo
3:02 Root shell: sudo -i
3:18 Removing users
3:32 Common mistakes
3:57 Cheat sheet
4:14 Like & subscribe
4:25 Homework & up next
⌨️ Commands from this video
whoami who am I?
id user ID, group ID and all your groups
cat /etc/passwd list of all accounts
sudo adduser anna create a user (with home folder)
su - anna / exit switch to another user and back
sudo groupadd developers create a group
sudo usermod -aG developers anna add a user to a group (always -aG!)
groups anna show a user's groups
sudo usermod -aG sudo anna give a user sudo rights
sudo visudo edit sudo rules safely (never edit /etc/sudoers directly)
sudo -i / exit open a root shell and leave it right away
sudo deluser --remove-home anna delete a user and their home folder
⚠️ usermod -G without -a removes the user from all other groups.
💡 New group membership applies after you log out and back in.
📺 Full course playlist:
◀ Previous – #5 Working with Files & Directories: [EP5 LINK]
▶ Next – #7 File Permissions: chmod, chown, umask: coming soon
💬 Homework: create a test user, add it to a group, switch to it with su -, then delete it. Post your id output in the comments!
👍 If this helped, like & subscribe, it keeps the course free.
© netacademy.ge
#Linux #UbuntuServer #SysAdmin