Courseiva

XK0-006 · topic practice

Services and User Management practice questions

This domain covers managing systemd services and timers, scheduling with cron and at, and controlling user access through sudo, PAM, and account tooling. Questions present realistic failure scenarios: a unit that will not start, a timer that never fires, or a sudo rule that grants too much, and ask you to pick the correct file, directive, or command.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Services and User Management

What the exam tests

What to know about Services and User Management

Be able to create and enable a systemd service plus timer pair, read unit state and logs to find why a service failed, and write a correct sudoers entry scoped by user, host, and command. The single most important thing is knowing that enabling a unit does not start it now.

Writing and enabling systemd unit and timer files with OnCalendar and Persistent settings

Diagnosing failed units using systemctl status, journalctl, and unit dependency directives

Configuring sudoers rules with User_Alias, Host_Alias, and NOPASSWD using visudo

Managing accounts and groups with useradd, usermod, groupadd, passwd, and chage

Watch out for

Common Services and User Management exam traps

  • ▸Editing /etc/sudoers directly instead of using visudo, which validates syntax and prevents a broken file from locking out sudo access
  • ▸Assuming a systemd timer runs on its own; it needs a matching .service unit and both must be enabled and started
  • ▸Forgetting that a unit enabled with systemctl enable only starts at boot, so a currently failed service still needs systemctl start or restart

Practice set

Services and User Management questions

20 questions · select your answer, then reveal the explanation

A Linux administrator needs to add a new user account 'jdoe' with UID 1500, primary group 'developers', home directory /home/jdoe, and login shell /bin/bash. Which command will accomplish this?

A Linux administrator needs to create a new user account for a contractor who will start next month. The account must be locked until the contractor's start date, but it must have a valid home directory and default shell. Which sequence of commands best accomplishes this?

A junior Linux administrator needs to add a new user account named 'dba' with a home directory '/home/dba' and the Bash shell. The account should be created with the next available UID, and a group with the same name should also be created. Which command should the administrator run?

A user reports that they cannot run sudo commands. The administrator checks and finds the user is not in the sudoers file. Which command should the administrator use to add the user to the sudo group on a Debian-based system?

A user reports that they cannot run `sudo` commands and receive the error: `user is not in the sudoers file. This incident will be reported.` The administrator needs to grant this user full sudo privileges. Which command should the administrator use?

A Linux administrator is troubleshooting a service that fails to start. The service unit file contains the line `ExecStart=/usr/bin/myservice --config /etc/myservice.conf`. After modifying the configuration file, the administrator runs `systemctl daemon-reload` and then `systemctl restart myservice`. However, the service still uses the old configuration. Which command should the administrator run to ensure the new configuration is applied?

A Linux administrator is configuring a systemd timer to run a backup script daily. The administrator creates a timer unit `backup.timer` and a service unit `backup.service`. Which two directives are required in the timer unit to schedule the job to run every day at 2:00 AM? (Choose two.)

A Linux administrator needs a service to start automatically at boot and be manageable with systemctl. The unit file is currently stored at /etc/systemd/system/myapp.service. After running 'systemctl daemon-reload', the administrator runs 'systemctl enable myapp.service' and receives the error 'Failed to enable unit: Unit file myapp.service does not exist.' Which command should the administrator run to resolve this?

A Linux administrator needs to create a new user account `alice` with a home directory `/home/alice`, a specific shell `/bin/bash`, and an expiration date of `2025-12-31`. The administrator also wants to ensure that a group with the same name is created. Which two commands can be used to achieve this? (Choose two.)

A Linux administrator needs to grant a developer named 'alex' the ability to run the command '/usr/sbin/reboot' as root without entering a password, but must not allow any other command. The system uses sudo. Which of the following is the correct way to configure this?

A Linux administrator is configuring a new server and needs to ensure that user accounts are created with specific defaults, such as a default shell of `/bin/bash` and a default home directory under `/home`. Which two files should the administrator modify to set these system-wide defaults for new users? (Choose two.)

A Linux administrator is configuring a system to mount an NFS share from server 'nfs01' at /mnt/data. The administrator wants the mount to be automatically available at boot and to allow users to mount it manually when needed. Which entry in /etc/fstab correctly achieves this?

A Linux administrator needs to schedule a script /usr/local/bin/backup.sh to run every day at 2:30 AM. The script must run as the user 'backup' and the schedule should persist across reboots. Which method should the administrator use?

A Linux administrator needs to grant a user named 'alice' the ability to run all commands as root without a password prompt, but only from the local console. Which entry in the sudoers file accomplishes this?

A junior Linux administrator needs to create a new user account named 'deploy' with a home directory /home/deploy, a default shell of /bin/bash, and add the user to the supplementary group 'docker'. Which command should be used?

A developer reports that a scheduled backup script, /usr/local/bin/backup.sh, runs successfully when executed manually as root but fails with 'Permission denied' when triggered by a systemd timer. The unit file backup.service contains ExecStart=/usr/local/bin/backup.sh. What is the most likely cause?

A Linux administrator is configuring a new system and needs to ensure that the user 'devops' has a specific umask of 027 and a custom PATH that includes /opt/tools/bin. The changes must apply to all future login shells for that user. Which two files should the administrator modify? (Choose two.)

A Linux administrator needs to configure a system so that a specific user `bob` can run only the command `/usr/bin/systemctl restart httpd` with sudo privileges, without being prompted for a password. Which entry should be added to the sudoers file?

A Linux administrator is configuring a systemd service unit for a custom application. The service should start automatically at boot, after the network is online, and should restart automatically if it fails. The administrator writes the unit file and places it in /etc/systemd/system/. Which of the following directives should be included in the [Unit] and [Service] sections to meet these requirements? (Choose two.)

A Linux administrator is troubleshooting a systemd service that fails to start. The administrator runs 'systemctl status myservice.service' and sees that the service is in a failed state. Which two commands will provide additional details about the failure? (Choose two.)

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Services and User Management sessions

Start a Services and User Management only practice session

Every question in these sessions is drawn from the Services and User Management domain — nothing else.

Related practice questions

Related XK0-006 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the XK0-006 exam test about Services and User Management?
Be able to create and enable a systemd service plus timer pair, read unit state and logs to find why a service failed, and write a correct sudoers entry scoped by user, host, and command. The single most important thing is knowing that enabling a unit does not start it now.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Services and User Management questions in a focused session?
Yes — the session launcher on this page draws every question from the Services and User Management domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other XK0-006 topics?
Use the topic links above to move to related areas, or go back to the XK0-006 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the XK0-006 exam covers. They are not copied from any real exam or dump site.