XK0-005 System Management • Complete Question Bank
Complete XK0-005 System Management question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
# systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2023-10-23 14:30:01 UTC; 5min ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 1234 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255)
Main PID: 1234 (code=exited, status=255)
Oct 23 14:30:01 server sshd[1234]: fatal: Cannot bind to port 22: Address already in useRefer to the exhibit. # cat /etc/systemd/system/myapp.service [Unit] Description=My Application After=network.target [Service] Type=simple ExecStart=/usr/local/bin/myapp Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target # systemctl daemon-reload # systemctl start myapp # systemctl status myapp ● myapp.service - My Application Loaded: loaded (/etc/systemd/system/myapp.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since ... Process: 5678 ExecStart=/usr/local/bin/myapp (code=exited, status=1/FAILURE) Oct 23 15:00:00 server myapp[5678]: Error: Configuration file not found
Refer to the exhibit.
$ systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2023-06-12 09:15:22 UTC; 5min ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 1234 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255)
Main PID: 1234 (code=exited, status=255)
Status: "Failed to start sshd"
Jun 12 09:15:22 server sshd[1234]: fatal: Missing privilege separation directory: /var/empty/sshdRefer to the exhibit.
$ systemctl status sshd.service
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2023-06-12 10:23:45 UTC; 2h 15min ago
Main PID: 1234 (sshd)
CGroup: /system.slice/sshd.service
└─1234 /usr/sbin/sshd -DDrag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
SELinux user identity
Part of RBAC, defines allowed roles
Main attribute for type enforcement
Sensitivity level for MLS/MCS
Optional categories for MCS
Drag a concept onto its matching description — or click a concept then click the description.
General kernel behavior
Virtual memory management
Network settings
Filesystem parameters
Device-specific settings
Refer to the exhibit. [root@server ~]# ls -Z /etc/shadow system_u:object_r:shadow_t:s0 /etc/shadow
Refer to the exhibit.
[root@server ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2023-01-23 10:15:00 EST; 2h 15min ago
Docs: man:httpd.service(8)
Main PID: 1234 (httpd)
Tasks: 11 (limit: 512)
Memory: 24.5M
CGroup: /system.slice/httpd.service
├─1234 /usr/sbin/httpd -DFOREGROUND
├─1245 /usr/sbin/httpd -DFOREGROUND
├─1246 /usr/sbin/httpd -DFOREGROUND
└─1247 /usr/sbin/httpd -DFOREGROUNDRefer to the exhibit. [root@server ~]# lvm pvdisplay --- Physical volume --- PV Name /dev/sdb1 VG Name data_vg PV Size <500.00 GiB / not usable 4.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 127999 Free PE 8192 Allocated PE 119807 PV UUID abc123-... PV Status not available
systemd-analyze blame output:
1.234s firewalld.service
0.876s network.service
0.654s postfix.service
0.321s sshd.service
0.123s systemd-logind.serviceOutput of 'free -h':
total used free shared buff/cache available
Mem: 7.7G 7.5G 0.1G 0.0G 0.1G 0.1G
Swap: 2.0G 1.2G 0.8GOutput of 'systemctl list-units -t service --state=failed': UNIT LOAD ACTIVE SUB DESCRIPTION httpd.service loaded failed failed The Apache HTTP Server Output of 'journalctl -u httpd.service --no-pager | tail -5': Mar 01 10:23:45 server systemd[1]: Starting The Apache HTTP Server... Mar 01 10:23:45 server httpd[1234]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 Mar 01 10:23:45 server systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE Mar 01 10:23:45 server systemd[1]: httpd.service: Failed with result 'exit-code'. Mar 01 10:23:45 server systemd[1]: Failed to start The Apache HTTP Server.
Refer to the exhibit. ``` $ cat /etc/fstab UUID=abc123 / ext4 defaults 1 1 UUID=def456 /boot ext4 defaults 1 2 UUID=ghi789 none swap sw 0 0 /dev/sdb1 /data ext4 defaults 0 0 ```
Refer to the exhibit. ``` $ systemctl status myservice.service ● myservice.service - My Custom Service Loaded: loaded (/etc/systemd/system/myservice.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2024-03-11 14:23:45 UTC; 3min ago Process: 12345 ExecStart=/usr/local/bin/myservice.sh (code=exited, status=1/FAILURE) Main PID: 12345 (code=exited, status=1) CGroup: /system.slice/myservice.service ```
Refer to the exhibit. ``` $ ls -l /etc/cron.daily/ total 8 -rwxr-xr-x 1 root root 245 Mar 10 10:00 logrotate -rwxr-xr-x 1 root root 123 Mar 10 10:00 syscheck ```
Refer to the exhibit. Filesystem Size Used Avail Use% Mounted on /dev/sda1 976M 120M 789M 14% /boot /dev/mapper/vg-root 18G 5.2G 12G 31% / tmpfs 1.9G 0 1.9G 0% /dev/shm /dev/mapper/vg-home 2.0G 1.9G 68M 97% /home
Refer to the exhibit. UNIT LOAD ACTIVE SUB DESCRIPTION sshd.service loaded active running OpenSSH Daemon httpd.service loaded failed failed Apache HTTP Server
A company runs a web application on a Linux server (Ubuntu 22.04). The application writes log files to /var/log/app/access.log and error.log. Over time, these logs have grown to several gigabytes, causing the /var partition to reach 98% capacity. The administrator decides to implement log rotation using logrotate. They create a configuration file at /etc/logrotate.d/app with the following content:
/var/log/app/*.log { weekly rotate 7 compress delaycompress size 100M missingok
}
They then run `logrotate -d /etc/logrotate.d/app` for debugging, which indicates no errors. However, after several days, the logs are not being rotated. Which step should the administrator take to resolve this?
[Unit] Description=My custom service After=network.target [Service] ExecStart=./myscript Restart=always [Install] WantedBy=multi-user.target
systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2023-03-13 09:15:23 UTC; 2min 47s ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 1234 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255)
Main PID: 1234 (code=exited, status=255)
Status: "Failed to start sshd: Address already in use"journalctl -xe -u NetworkManager.service Mar 13 10:22:15 hostname NetworkManager[1023]: <warn> [1678710135.1234] device (eth0): Activation: failed for connection 'Wired connection 1' Mar 13 10:22:15 hostname NetworkManager[1023]: <info> [1678710135.1235] device (eth0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed') Mar 13 10:22:15 hostname NetworkManager[1023]: <warn> [1678710135.1236] device (eth0): Activation: failed to connect: No suitable device found
ps aux | grep apache root 1234 0.0 0.1 12345 6789 ? Ss 10:00 0:00 /usr/sbin/httpd -k start apache 1235 0.2 2.3 45678 23456 ? S 10:00 0:05 /usr/sbin/httpd -k start apache 1236 0.3 2.4 45678 24000 ? S 10:00 0:06 /usr/sbin/httpd -k start apache 1237 0.0 0.1 0 0 ? Z 10:05 0:00 [httpd] <defunct> # cat /proc/sys/kernel/pid_max 32768
# cat /etc/fstab UUID=1234-5678 / ext4 defaults 1 1 UUID=abcd-ef01 /boot ext4 defaults 1 2 UUID=9012-3456 /home xfs defaults 0 0 UUID=7890-1234 /var ext4 defaults 1 2 # mount -a mount: /var: mount point does not exist. # ls -ld /var ls: cannot access '/var': No such file or directory