CompTIA Linux+ XK0-005 – Question060

Based on an organization's new cybersecurity policies, an administrator has been instructed to ensure that, by default, all new users and groups that are created fall within the specified values below.

To which of the following configuration files will the required changes need to be made?

A.
/etc/login.defs
B. /etc/security/limits.conf
C. /etc/default/useradd
D. /etc/profile

Correct Answer: C

CompTIA Linux+ XK0-005 – Question059

A Linux system fails to start and delivers the following error message:

Which of the following commands can be used to address this issue?

A.
fsck.ext4 /dev/sda1
B. partprobe /dev/sda1
C. fdisk /dev/sda1
D. mkfs.ext4 /dev/sda1

Correct Answer: A

CompTIA Linux+ XK0-005 – Question057

SIMULATION
Junior system administrator had trouble installing and running an Apache web server on a Linux server. You have been tasked with installing the Apache web server on the Linux server and resolving the issue that prevented the junior administrator from running Apache.
INSTRUCTIONS
Install Apache and start the service. Verify that the Apache service is running with the defaults.
Typing help in the terminal will show a list of relevant event commands.

Correct Answer: See the explanation below.

Explanation:

Explanation:
yum install httpd
systemctl -now enable httpd
systemctl status httpd
netstat -tunlp | grep 80
pkill systemctl restart httpd
systemetctl status httpd

CompTIA Linux+ XK0-005 – Question056

A systems administrator needs to check if the service systemd-resolved.service is running without any errors. Which of the following commands will show this information?

A.
systemctl status systemd-resolved.service
B. systemctl enable systemd-resolved.service
C. systemctl mask systemd-resolved.service
D. systemctl show systemd-resolved.service

Correct Answer: A

CompTIA Linux+ XK0-005 – Question055

A Linux engineer has been notified about the possible deletion of logs from the file /opt/app/logs. The engineer needs to ensure the log file can only be written into without removing previous entries.

Which of the following commands would be BEST to use to accomplish this task?

A.
chattr +a /opt/app/logs
B. chattr +d /opt/app/logs
C. chattr +i /opt/app/logs
D. chattr +c /opt/app/logs

Correct Answer: A

CompTIA Linux+ XK0-005 – Question054

A Linux engineer set up two local DNS servers (10.10.10.10 and 10.10.10.20) and was testing email connectivity to the local mail server using the mail command on a local machine when the following error appeared:

The local machine DNS settings are:

Which of the following commands could the engineer use to query the DNS server to get mail server information?

A.
dig @example.com 10.10.10.20 a
B. dig @10.10.10.20 example.com mx
C. dig @example.com 10.10.10.20 ptr
D. dig @10.10.10.20 example.com ns

Correct Answer: B

CompTIA Linux+ XK0-005 – Question053

A Linux administrator wants to find out whether files from the wget package have been altered since they were installed. Which of the following commands will provide the correct information?

A.
rpm -i wget
B. rpm -qf wget
C. rpm -F wget
D. rpm -V wget

Correct Answer: D

CompTIA Linux+ XK0-005 – Question052

A Linux administrator is scheduling a system job that runs a script to check available disk space every hour.
The Linux administrator does not want users to be able to start the job. Given the following:

The Linux administrator attempts to start the timer service but receives the following error message:

Which of the following is MOST likely the reason the timer will not start?

A.
The checkdiskspace.timer unit should be enabled via systemctl.
B. The timers.target should be reloaded to get the new configuration.
C. The checkdiskspace.timer should be configured to allow manual starts.
D. The checkdiskspace.timer should be started using the sudo command.

Correct Answer: C

CompTIA Linux+ XK0-005 – Question051

A newly created container has been unable to start properly, and a Linux administrator is analyzing the cause of the failure. Which of the following will allow the administrator to determine the FIRST command that is executed inside the container right after it starts?

A.
docker export <container_id>
B. docker info <container_id>
C. docker start <container_id>
D. docker inspect <container_id>

Correct Answer: D