🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › IT Support / Networking › Operating Systems: Installation, Configuration, and Support › Lesson 8
TEC-ITS43-03 · Lesson 8 · 12.5 clock hours · lab

Linux User Management, Permissions, and Package Management

Objective. Students will create and manage Linux user accounts and groups, assign file permissions using chmod and chown, and install and remove software packages using apt.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

Linux User Management, Permissions, and Package Management

Why This Matters

Linux is the backbone of servers, cloud infrastructure, and network devices you will support throughout your career. Managing who can log in, what files they can touch, and what software is installed are core day-one tasks for any IT support technician. This lesson covers three tightly connected skills: user and group management, file permission control, and package management with `apt`.

---

Safety and Best Practices

Before running any command as root or with `sudo`, pause and read it carefully. A mistyped `rm` or `chmod` command can delete data or open security gaps that are difficult to reverse. Always work on your assigned lab VM, never on a shared production system. When elevated privileges are required, use `sudo` for individual commands rather than logging in as root for an entire session. This limits the blast radius of any mistake.

---

User and Group Management

Linux is a multi-user operating system. Every file, process, and resource is owned by a user and associated with a group. The operating system uses numeric identifiers called the UID (user ID) and GID (group ID) internally, though you work with human-readable names.

Creating users is done with `useradd`. The `-m` flag creates a home directory automatically:

```

sudo useradd -m technician

sudo useradd -m auditor

```

Setting passwords uses `passwd`:

```

sudo passwd technician

sudo passwd auditor

```

Creating a group uses `groupadd`:

```

sudo groupadd itstaff

```

Adding users to a group uses `usermod` with the `-aG` flags (`-a` appends; without it you would remove the user from all other groups):

```

sudo usermod -aG itstaff technician

sudo usermod -aG itstaff auditor

```

Verifying your work uses two commands. `cat /etc/passwd` lists all user accounts line by line. The `id` command shows a specific user's UID, primary GID, and all group memberships:

```

id technician

```

User account data is stored in `/etc/passwd`. Password hashes are kept separately in `/etc/shadow`, which only root can read — an important security separation.

---

File Permissions

Every file and directory in Linux has three permission sets: owner, group, and others (sometimes called world). Each set has three bits: read (r = 4), write (w = 2), and execute (x = 1).

Permissions are displayed by `ls -l` as a ten-character string such as `-rwxrw-r--`. The first character is the file type (`-` for file, `d` for directory). The next nine characters are three groups of three.

`chmod` changes permissions. You can use symbolic mode (`u+x`) or octal notation, which is faster for setting all three groups at once. Add the values for each set:

So `chmod 770` means owner=rwx, group=rwx, others=no access.

`chown` changes ownership. The syntax is `chown owner:group target`. To assign a directory to the `itstaff` group while keeping root as owner:

```

sudo chown root:itstaff /srv/shared

sudo chmod 770 /srv/shared

```

To test permissions, switch users with `su - technician` and attempt to create a file inside `/srv/shared`. A member of `itstaff` should succeed; a user outside the group should receive a "Permission denied" error.

Execute permission on a directory means the ability to enter it (`cd`). Without it, even read permission is useless. Always set `x` on directories you want users to access.

---

Package Management with apt

Ubuntu and other Debian-based distributions use APT (Advanced Package Tool) to install, update, and remove software from online repositories.

Update the package index first. This does not install anything; it refreshes the local list of available packages:

```

sudo apt update

```

Install packages with `apt install`. You can list multiple packages on one line:

```

sudo apt install net-tools htop nmap

```

Verify installation with `which` (shows the binary path) or `dpkg -l packagename`:

```

which htop

dpkg -l nmap

```

Remove a package cleanly with `apt remove`. Adding `--purge` also deletes configuration files:

```

sudo apt remove htop

```

Review apt history in `/var/log/apt/history.log` to confirm what was installed or removed and when. This is your audit trail and should match your lab log.

---

Documenting Your Work

For every command you run, record the command and the key lines of output in your lab log. In a real workplace, this documentation proves what changed and when, which is essential during troubleshooting and security audits. Get into the habit now.

Key terms9

UID (User ID)A unique numeric identifier assigned to each Linux user account; the kernel uses UIDs internally to track ownership and access rights.
GID (Group ID)A unique numeric identifier assigned to a Linux group; files and directories are associated with a GID to control group-level access.
chmodA Linux command used to change the read, write, and execute permissions on files and directories, using either symbolic or octal notation.
chownA Linux command used to change the owning user and/or group of a file or directory.
Octal permission notationA three-digit number where each digit represents the permission set for owner, group, and others respectively; each digit is the sum of read (4), write (2), and execute (1).
sudoA command that allows an authorized user to run a single command with elevated (root-level) privileges without logging in as root.
APT (Advanced Package Tool)The package management system used by Ubuntu and other Debian-based Linux distributions to install, update, and remove software from repositories.
usermod -aGA command that appends a user to a supplementary group without removing them from any existing groups; the -a flag is critical to prevent accidental group removal.
/etc/shadowA Linux file that stores hashed user passwords; readable only by root, keeping password data separate from the world-readable /etc/passwd file.
In class: Using the terminal, students create two user accounts (technician, auditor) and one group (itstaff), add both users to the group, set passwords, and verify with cat /etc/passwd and id commands. · Create a directory /srv/shared, set ownership to itstaff group, apply permissions so group members can read and write but others have no access (chmod 770), then test by switching users and attempting file creation. · Use apt to update the package list, install three specified utilities (e.g., net-tools, htop, nmap), verify installation, then remove one package cleanly and confirm removal; document each command and output in the lab log.
Materials: Ubuntu LTS VMs from previous lesson, lab log template, CompTIA A+ Core 2 Study Guide, instructor-prepared permissions worksheet
Check: Instructor verifies: correct user/group memberships shown by id command, permission test logins produce correct allow/deny results, apt history confirms package installs and removal, lab log complete. All four checks required.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

CompTIA A+ Core 2: Operating Systems
1. A technician needs to create a new user account named 'jsmith' and automatically create a home directory. Which command is correct?
CompTIA A+ Core 2: Operating Systems
2. After running `sudo usermod -aG itstaff auditor`, the technician verifies the change. Which command shows all group memberships for the auditor account?
CompTIA A+ Core 2: Operating Systems
3. A directory must allow the owning group to read and write files but give no access to all other users. Which chmod command is correct?
CompTIA Network+: Network Security
4. What does the octal value 6 represent in a Linux permission set?
CompTIA A+ Core 2: Operating Systems
5. A technician wants to install nmap on an Ubuntu system. Before installing, they should run which command to ensure the package list is current?
CompTIA A+ Core 2: Operating Systems
6. After removing a package with `sudo apt remove htop`, the technician wants to confirm it is gone. Which command is most direct?
CompTIA A+ Core 2: Operating Systems
7. A user who is NOT a member of the itstaff group attempts to create a file in /srv/shared, which has permissions 770 owned by root:itstaff. What will happen?
CompTIA Security+ / CompTIA A+ Core 2: Operating Systems
8. Which file stores hashed user passwords on a Linux system, and who can read it by default?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.