$ run as a normal user# run as root (or with sudo)
Users, groups and permissions
Questions about accounts, rights and shared folders.
| Task | Short answer |
|---|---|
Create a folder where all members of sales share files, new files get the group, and people cannot delete each other's files | chgrp sales DIR, chmod 3770 DIR (SGID + sticky) — lesson |
User lisa must change her password every 60 days | chage -M 60 lisa — lesson |
| All new users must get a file in their home folder | Put it in /etc/skel — lesson |
Group webadmins may restart httpd as root, nothing else | File in /etc/sudoers.d/ with visudo -f — lesson |
Give user carol read access to one file without changing owner or group | setfacl -m u:carol:r FILE — lesson |
Storage
Partitions, LVM, swap and mounts.
| Task | Short answer |
|---|---|
Create an LV of 500 MiB named my_lv with extents of 8 MiB, ext4, mounted on /data at boot | pvcreate, vgcreate -s 8M, lvcreate -n my_lv -L 500M, mkfs.ext4, fstab line, mount -a — lesson |
| Make an XFS LV 1 GiB bigger while it is mounted | lvextend -r -L +1G — lesson |
| Add 1 GiB of swap that is active after reboot | Partition or LV, mkswap, fstab swap line, swapon -a — lesson |
| Mount a file system by UUID at boot | blkid for the UUID, fstab UUID=… line — lesson |
Home folders of NFS users must appear under /home/remote when used | autofs wildcard map * -rw server:/path/& — lesson |
Software, services and scheduling
Repositories, services, boot and jobs.
| Task | Short answer |
|---|---|
| Install software from a repository at a given URL | .repo file with baseurl, then dnf install — lesson |
| A service must run now and after every reboot | systemctl enable --now SERVICE — lesson |
| The system must boot into text mode | systemctl set-default multi-user.target — lesson |
User anna runs a command every weekday at 14:23 | crontab -e -u anna: 23 14 * * 1-5 COMMAND — lesson |
| The journal must survive reboots | Storage=persistent in a journald drop-in, restart journald — lesson |
| Set the recommended tuned profile | tuned-adm recommend, then tuned-adm profile NAME — lesson |
Network and security
Network settings, SSH, firewall, SELinux, time.
| Task | Short answer |
|---|---|
| Set a fixed IPv4 address, gateway and DNS persistently | nmcli con mod … ipv4.method manual …, nmcli con up — lesson |
| Change the host name persistently | hostnamectl set-hostname NAME — lesson |
Run Apache with a document root in /web | Config + semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?" + restorecon -Rv /web — lesson |
| Let sshd listen on port 2022 | sshd drop-in, semanage port -a -t ssh_port_t, firewall-cmd --add-port — lesson |
| Open the http service in the firewall for good | firewall-cmd --add-service=http --permanent, --reload — lesson |
Sync time from time.example.com | server time.example.com iburst in chrony.conf, restart chronyd — lesson |
Boot and repair
Getting into a broken system.
| Task | Short answer |
|---|---|
| Reset the unknown root password | rd.break, remount /sysroot rw, chroot, passwd, touch /.autorelabel — lesson |
| The system stops in emergency mode after an fstab change | mount -o remount,rw /, fix fstab, mount -a, reboot — lesson |
Remove rhgb quiet from the kernel line | grubby --update-kernel=ALL --remove-args="rhgb quiet" — lesson |
| Make a module load at every boot | File in /etc/modules-load.d/ — lesson |
Remember
When you can answer every row, do the practice exams below — on clean VMs, in the time limit, and reboot at the end before you check.