0% found this document useful (0 votes)
168 views23 pages

XK0-005 Exam - Free Actual Q&As, Page 5 - ExamTopics 201-250

The document contains a series of exam questions and answers related to Linux administration, covering topics such as file permissions, system commands, and security practices. Each question presents a scenario with multiple-choice answers, highlighting the correct option based on best practices and system management. The content is aimed at preparing individuals for the XK0-005 exam, focusing on practical knowledge and troubleshooting skills in a Linux environment.

Uploaded by

Vipul Goyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views23 pages

XK0-005 Exam - Free Actual Q&As, Page 5 - ExamTopics 201-250

The document contains a series of exam questions and answers related to Linux administration, covering topics such as file permissions, system commands, and security practices. Each question presents a scenario with multiple-choice answers, highlighting the correct option based on best practices and system management. The content is aimed at preparing individuals for the XK0-005 exam, focusing on practical knowledge and troubleshooting skills in a Linux environment.

Uploaded by

Vipul Goyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

- Expert Verified, Online, Free.

 Custom View Settings

Question #201 Topic 1

A user created the following script file:

#!/bin/bash

# FILENAME: /home/user/script.sh

echo "hello world"

exit 1

However, when the user tried to run the script file using the command ~/script.sh, an error returned indicating permission was denied. Which of

the following should the user execute in order for the script to run properly?

A. chmod u+x /home/user/script.sh

B. chmod 600 /home/user/script.sh

C. chmod 007 /home/user/script.sh

D. chmod o+r /home/user/script.sh

Correct Answer: A

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 1/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #202 Topic 1

A systems administrator is enabling LUKS on a USB storage device with an ext4 filesystem format. The administrator runs dmesg and notices the

following output:

Given this scenario, which of the following should the administrator perform to meet these requirements? (Choose three.)

A. gpg /dev/sdc1

B. pvcreate /dev/sdc

C. mkfs.ext4 /dev/mapper/LUKS0001 - L ENCRYPTED

D. umount /dev/sdc Most Voted

E. fdisk /dev/sdc

F. mkfs.vfat /dev/mapper/LUKS0001 - L ENCRYPTED

G. wipefs -a/dev/sdb1

H. cryptsetup luksFormat /dev/sdc1 Most Voted

Correct Answer: DEH

Community vote distribution


DH (67%) BCH (33%)

Question #203 Topic 1

A developer wants to ensure that all files and folders created inside a shared folder named /Group00DEV inherit the group name of the parent

folder. Which of the following commands will help achieve this goal?

A. chmod g+x /Group00DEV/

B. chmod g+w /Group00DEV/

C. chmod g+r /Group00DEV/ Most Voted

D. chmod g+s /Group00DEV/

Correct Answer: D

Community vote distribution


D (67%) C (33%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 2/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #204 Topic 1

Ann, a security administrator, is performing home directory audits on a Linux server. Ann issues the su Joe command and then issues the ls

command. The output displays files that reside in Ann's home directory instead of Joe's. Which of the following represents the command Ann

should have issued in order to list Joe's files?

A. su - Joe Most Voted

B. sudo Joe

C. visudo Joe

D. pkexec Joe

Correct Answer: A

Community vote distribution


A (100%)

Question #205 Topic 1

A developer needs to launch an Nginx image container, name it Web00l, and expose port 8080 externally while mapping to port 80 inside the

container. Which of the following commands will accomplish this task?

A. docker exec -it -p 8080:80 --name Web001 nginx

B. docker load -it -p 8080:80 --name Web001 nginx

C. docker run -it -p 8080:80 --name Web001 nginx

D. docker pull -it -p 8080:80 --name Web001 nginx

Correct Answer: C

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 3/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #206 Topic 1

The security team has identified a web service that is running with elevated privileges. A Linux administrator is working to change the systemd

service file to meet security compliance standards. Given the following output:

[Unit]

Description=CompTIA server daemon

Documentation=man:webserver(8) man:webserver_config(5)

After=network.target -

[Service]

Type=notify -

EnvironmentFile=/etc/webserver/config

ExecStart=/usr/sbin/webserver -D $OPTIONS

ExecReload=/bin/kill -HUP SMAINPID

KillMode=process -

Restart=on-failure -

RestartSec=42s -

[Install]

WantedBy=multi-user.target -

Which of the following remediation steps will prevent the web service from running as a privileged user?

A. Removing the ExecStart=/usr/sbin/webserver -D $OPTIONS from the service file

B. Updating the EnvironmentFile line in the [Service] section to /home/webservice/config

C. Adding the User=webservice to the [Service] section of the service file Most Voted

D. Changing the multi-user.target in the [Install] section to basic.target

Correct Answer: C

Community vote distribution


C (100%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 4/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #207 Topic 1

A Linux administrator provisioned a new web server with custom administrative permissions for certain users. The administrator receives a report

that user1 is unable to restart the Apache web service on this server. The administrator reviews the following output:

Which of the following would most likely resolve the issue while maintaining a least privilege security model?

A. User1 should be added to the wheel group to manage the service.

B. User1 should have "NOPASSWD:" after the "ALL=" in the custom.conf.

C. The wheel line in the custom.conf file should be uncommented.

D. Webadmin should be listed as a group in the custom.conf file. Most Voted

Correct Answer: D

Community vote distribution


D (67%) B (33%)

Question #208 Topic 1

Which of the following would significantly help to reduce data loss if more than one drive fails at the same time?

A. Server clustering

B. Load balancing

C. RAID

D. VDI

Correct Answer: C

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 5/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #209 Topic 1

A systems administrator receives reports that several virtual machines in a host are responding slower than expected. Upon further investigation,

the administrator obtains the following output from one of the affected systems:

Which of the following best explains the reported issue?

A. The physical host is running out of CPU resources, leading to insufficient CPU time being allocated to virtual machines. Most Voted

B. The physical host has enough CPU cores, leading to users running more processes to compensate for the slower response times.

C. The virtual machine has enough CPU cycles, leading to the system use percentage being higher than expected.

D. The virtual machine is running out of CPU resources, leading to users experiencing longer response times.

Correct Answer: A

Community vote distribution


A (100%)

Question #210 Topic 1

A user is unable to remotely log on to a server using the server name server1 and port 22. The Linux engineer troubleshoots the issue and gathers

the following information:

Which of the following is most likely causing the issue?

A. server1 is not in the DNS.

B. sshd is running on a non-standard port. Most Voted

C. sshd is not an active service.

D. server1 is using an incorrect IP address.

Correct Answer: B

Community vote distribution


B (100%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 6/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #211 Topic 1

A systems administrator needs to extend the logical volume /dev/mapper/linux-root to use all available space in its volume group. The filesystem

should be extended as well. Which of the following commands will allow the administrator to achieve this goal?

A. lvm pvresize -r -l100% /dev/mapper/linux-root

B. lvchange -L100% /dev/mapper/linux-root

C. lvextend -l+100% /dev/mapper/linux-root

D. lvresize -l100%FREE -r /dev/mapper/linux-root Most Voted

Correct Answer: D

Community vote distribution


D (67%) C (33%)

Question #212 Topic 1

A systems administrator is gathering information about a file type and the contents of a file. Which of the following commands should the

administrator use to accomplish this task?

A. file filename

B. touch filename

C. grep filename

D. lsof filename

Correct Answer: A

Question #213 Topic 1

A systems administrator is investigating a service that is not starting up. Given the following information:

Which of the following systemd commands should the administrator use in order to obtain more details about the failing service?

A. systemctl analyze network

B. systemctl info network

C. sysctl -a network

D. journalctl -xu network

Correct Answer: D

Community vote distribution


D (100%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 7/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #214 Topic 1

A DevOps engineer wants to allow the same Kubernetes container configurations to be deployed in development, testing, and production

environments. A key requirement is that the containers should be configured so that developers do not have to statically configure custom,

environment-specific locations. Which of the following should the engineer use to meet this requirement?

A. Custom scheduler

B. Node affinity

C. Overlay network Most Voted

D. Ambassador container

Correct Answer: C

Community vote distribution


C (75%) D (25%)

Question #215 Topic 1

After starting an Apache web server, the administrator receives the following error:

Which of the following commands should the administrator use to further troubleshoot this issue?

A. ss Most Voted

B. ip

C. dig

D. nc

Correct Answer: A

Community vote distribution


A (100%)

Question #216 Topic 1

Which of the following commands should a technician use to create an administrative account for the username Joe?

A. sudo useradd -G wheel joe Most Voted

B. sudo useradd joe; sudo passwd -l joe

C. sudo useradd joe; sudo cat key.pem > ~/.ssh/authorized_keys

D. sudo useradd joe; groupadd admin joe

Correct Answer: A

Community vote distribution


A (100%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 8/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #217 Topic 1

Due to performance issues on a server, a Linux administrator needs to terminate an unresponsive process. Which of the following commands

should the administrator use to terminate the process immediately without waiting for a graceful shutdown?

A. kill -SIGKILL 5545 Most Voted

B. kill -SIGTERM 5545

C. kill -SIGHUP 5545

D. kill -SIGINT 5545

Correct Answer: A

Community vote distribution


A (100%)

Question #218 Topic 1

A Linux administrator generated a list of users who have root-level command-line access to the Linux server to meet an audit requirement. The

administrator analyzes the following /etc/passwd and /etc/sudoers files:

Which of the following users, in addition to the root user, should be listed in the audit report as having root-level command-line access? (Choose

two.)

A. Carl Most Voted

B. Lee Most Voted

C. Mallory

D. Eve

E. Bob

F. Alice

Correct Answer: AB

Community vote distribution


AB (86%) 14%

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 9/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #219 Topic 1

The group named support is unable to make changes to the config file. An administrator is reviewing the permissions and sees the following:

$ ls -l config

-rw-rw----. 1 root app 4682 02-15 11:25 config

Which of the following should the administrator execute in order to give the support group access to modify the file while preserving the current

ownership?

A. chown :support config

B. setfacl -m g:support:rw- config Most Voted

C. chmod 664 config

D. chmod g+s config

Correct Answer: B

Community vote distribution


B (100%)

Question #220 Topic 1

Which of the following actions are considered good security practices when hardening a Linux server? (Choose two.)

A. Renaming the root account to something else

B. Removing unnecessary packages Most Voted

C. Changing the default shell to /bin/csh

D. Disabling public key authentication

E. Disabling the SSH root login possibility Most Voted

F. Changing the permissions on the root filesystem to 600

Correct Answer: BE

Community vote distribution


BE (100%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 10/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #221 Topic 1

A Linux user is trying to execute commands with sudo but is receiving the following error:

$ sudo visudo

>>> /etc/sudoers: syntax error near line 28 <<<

sudo: parse error in /etc/sudoers near line 28

sudo: no valid sudoers sources found, quitting

The following output is provided:

# grep root /etc/shadow

root:*LOCK*:14600::::::

Which of the following actions will resolve this issue?

A. Log in directly using the root account and comment out line 28 from /etc/sudoers.

B. Boot the system in single user mode and comment out line 28 from /etc/sudoers. Most Voted

C. Comment out line 28 from /etc/sudoers and try to use sudo again.

D. Log in to the system using the other regular user, switch to root, and comment out line 28 from /etc/sudoers.

Correct Answer: B

Community vote distribution


B (100%)

Question #222 Topic 1

Users are experiencing high latency when accessing a web application served by a Linux machine. A systems administrator checks the network

interface counters and sees the following:

Which of the following is the most probable cause of the observed latency?

A. The network interface is disconnected.

B. A connection problem exists on the network interface. Most Voted

C. No IP address is assigned to the interface.

D. The gateway is unreachable.

Correct Answer: B

Community vote distribution


B (86%) 14%

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 11/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #223 Topic 1

A Linux administrator needs to create a symlink for /usr/local/bin/app-a, which was installed in /usr/local/share/app-a. Which of the following

commands should the administrator use?

A. ln -s /usr/local/bin/app-a /usr/local/share/app-a Most Voted

B. mv -f /usr/local/share/app-a /usr/local/bin/app-a

C. cp -f /usr/local/share/app-a /usr/local/bin/app-a

D. rsync -a/usr/local/share/app-a /usr/local/bin/app-a

Correct Answer: A

Community vote distribution


A (100%)

Question #224 Topic 1

The applications team is reporting issues when trying to access the web service hosted in a Linux system. The Linux systems administrator is

reviewing the following outputs:

Output 1:

Output 2:

Which of the following statements best describe the root cause? (Choose two.)

A. The httpd service is currently started.

B. The httpd service is enabled to auto start at boot time, but it failed to start.

C. The httpd service was manually stopped.

D. The httpd service is not enabled to auto start at boot time. Most Voted

E. The httpd service runs without problems.

F. The httpd service did not start during the last server reboot. Most Voted

Correct Answer: DF

Community vote distribution


DF (100%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 12/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #225 Topic 1

Which of the following specifications is used to perform disk encryption in a Linux system?

A. LUKS Most Voted

B. TLS

C. SSL

D. NFS

Correct Answer: A

Community vote distribution


A (100%)

Question #226 Topic 1

A junior developer is unable to access an application server and receives the following output:

[root@server1 ~]# ssh [email protected]

[email protected]'s password:

Permission denied, please try again.

[email protected]'s password:

Permission denied, please try again.

[email protected]'s password:

Account locked due to 4 failed logins

Account locked due to 5 failed logins

Last login: Mon Apr 22 21:21:06 2021 from 172.16.16.52

The systems administrator investigates the issue and receives the following output:

[root@server1 ~]# pam_tally2 --user=dev2

Login Failures Latest failure From

dev2 5 04/22/21 21:22:37 172.16.16.52

Which of the following commands will help unlock the account?

A. pam_tally2 --user=dev2 --quiet

B. pam_tally2 --user=dev2

C. pam_tally2 --user+dev2 --quiet

D. pam_tally2 --user=dev2 --reset

Correct Answer: D

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 13/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #227 Topic 1

A systems technician is configuring an application server to accept packets from a trusted source with the IP address 192.168.10.22. Which of

the following commands will allow communication between the two servers?

A. iptables -L -s 192.168.10.22 -j ACCEPT

B. iptables -D INPUT -s 192.168.10.22 -j ACCEPT

C. iptables -A INPUT -s 192.168.10.22 -j ACCEPT

D. iptables -A OUTPUT -s 192.168.10.22 -j ACCEPT

Correct Answer: C

Question #228 Topic 1

An administrator needs to increase the system priority of a process with PID 2274. Which of the following commands should the administrator

use to accomplish this task?

A. renice -n -15 2274 Most Voted

B. nice -15 2274

C. echo "-15" > /proc/PID/2274/priority

D. ps -ef | grep 2274

Correct Answer: A

Community vote distribution


A (100%)

Question #229 Topic 1

A Linux administrator is creating a new sudo profile for the accounting user. Which of the following should be added by the administrator to the

sudo configuration file so that the accounting user can run /opt/acc/report as root?

A. accounting localhost=/opt/acc/report

B. accounting ALL=/opt/acc/report

C. %accounting ALL=(ALL) NOPASSWD: /opt/acc/report

D. accounting /opt/acc/report=(ALL) NOPASSWD: ALL

Correct Answer: B

Community vote distribution


B (100%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 14/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #230 Topic 1

An administrator needs to make an application change via a script that must be run only in console mode. Which of the following best represents

the sequence the administrator should execute to accomplish this task?

A. systemctl isolate multi-user.target

sh script.sh

systemctl isolate graphical.target Most Voted

B. systemctl isolate graphical.target

sh script.sh

systemctl isolate multi-user.target

C. sh script.sh

systemctl isolate multi-user.target

systemctl isolate graphical.target

D. systemctl isolate multi-user.target

systemctl isolate graphical.target

sh script.sh

Correct Answer: A

Community vote distribution


A (100%)

Question #231 Topic 1

A Linux administrator logs in to a system and identifies that an important backup has been started. The backup process is consuming a

considerable amount of CPU lime but needs to continue. Which of the following should the administrator use to reduce the impact this process

has on other services?

A. renice -n 15 -p Most Voted

B. nice -n 15 -p

C. renice -n -15 -p

D. nice -n -15 -p

Correct Answer: A

Community vote distribution


A (100%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 15/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #232 Topic 1

The application team has reported latency issues that are causing the application to crash on the Linux server. The Linux administrator starts

troubleshooting and receives the following output:

Which of the following commands will improve the latency issue?

A. # echo 'net.core.net_backlog = 5000000' >> /etc/sysctl.conf

# sysctl -p

# systemctl daemon-reload

B. # ifdown eth0

# ip link set dev eth0 mtu 800

# ifup eth0

C. # systemctl stop network

# ethtool -g eth0 512

# systemctl start network

D. # echo 'net.core.rmem_max = 12500000' >> /etc/sysctl.conf

# echo 'net.core.wmem_max = 12500000' >> /etc/sysctl.conf

# sysctl -p Most Voted

Correct Answer: D

Community vote distribution


D (100%)

Question #233 Topic 1

An administrator recently updated the BIND software package and would like to review the default configuration that shipped with this version.

Which of the following files should the administrator review?

A. /etc/named.conf.rpmnew Most Voted

B. /etc/named.conf.rpmsave

C. /etc/named.conf

D. /etc/bind/bind.conf

Correct Answer: A

Community vote distribution


A (50%) C (50%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 16/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #234 Topic 1

A systems administrator received a request to change a user's credentials. Which of the following commands will grant the request?

A. sudo passwd Most Voted

B. sudo userdel

C. sudo chage

D. sudo usermod

Correct Answer: A

Community vote distribution


A (80%) D (20%)

Question #235 Topic 1

A user is unable to log on to a Linux workstation. The systems administrator executes the following command:

The command results in the following output:

Which of the following should the systems administrator execute to fix the issue?

A. chown -R user1:user1 /home/user1

B. sed -i '/:::/::/g' /etc/shadow

C. chgrp user1:user1 /home/user1

D. passwd -u user1 Most Voted

Correct Answer: D

Community vote distribution


D (100%)

Question #236 Topic 1

A systems administrator is tasked with creating an Ansible playbook to automate the installation of patches on several Linux systems. In which of

the following languages should the playbook be written?

A. SQL

B. YAML

C. HTML

D. JSON

Correct Answer: B

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 17/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #237 Topic 1

A systems administrator is working on a security report from the Linux servers. Which of the following commands can the administrator use to

display all the firewall rules applied to the Linux servers? (Choose two.)

A. ufw limit

B. iptables -F

C. systemctl status firewalld

D. firewall-cmd --list-all Most Voted

E. ufw status Most Voted

F. iptables -A

Correct Answer: DE

Community vote distribution


DE (100%)

Question #238 Topic 1

A Linux administrator intends to start using KVM on a Linux server. Which of the following commands will allow the administrator to load the KVM

module as well as any related dependencies?

A. modprobe kvm Most Voted

B. insmod kvm

C. depmod kvm

D. hotplug kvm

Correct Answer: A

Community vote distribution


A (100%)

Question #239 Topic 1

The group owner of the /home/test directory would like to preserve all group permissions on files created in the directory. Which of the following

commands should the group owner execute?

A. chmod g+s /home/test Most Voted

B. chgrp test /home/test

C. chmod 777 /home/test

D. chown -hR test /home/test

Correct Answer: A

Community vote distribution


A (100%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 18/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #240 Topic 1

The administrator comptia is not able to perform privileged functions on a newly deployed system. Given the following command outputs:

Which of the following is the reason that the administrator is unable to perform the assigned duties?

A. The administrator needs a password reset.

B. The administrator is not a part of the correct group. Most Voted

C. The administrator did not update the sudo database.

D. The administrator's credentials need to be more complex.

Correct Answer: B

Community vote distribution


B (100%)

Question #241 Topic 1

A Linux administrator deployed a large-scale application service as a containerized pod. The Linux administrator needs to continually send the

application's log file to the company's central log store. Which of the following should the Linux administrator do to efficiently perform this task?

A. Configure a sidecar to perform log shipping. Most Voted

B. Run docker exec to access the logs within the container.

C. Execute docker inspect and run a log rsync replication.

D. Set up a custom task scheduler via kubectl.

Correct Answer: A

Community vote distribution


A (100%)

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 19/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #242 Topic 1

A systems administrator is trying to track down a rogue process that has a TCP listener on a network interface for remote command-and-control

instructions. Which of the following commands should the systems administrator use to generate a list of rogue process names? (Choose two.)

A. netstat -antp | grep LISTEN Most Voted

B. lsof -iTCP | grep LISTEN Most Voted

C. lsof -i:22 | grep TCP

D. netstat -a | grep TCP

E. nmap -p1-65535 | grep -i tcp

F. nmap -sS 0.0.0.0/0

Correct Answer: AB

Community vote distribution


AB (100%)

Question #243 Topic 1

A Linux engineer finds multiple failed login entries in the security log file for application users. The Linux engineer performs a security audit and

discovers a security issue. Given the following:

# grep -iE '*www*|db' /etc/passwd

www-data:x:502:502:www-data:/var/www:/bin/bash

db:x:505:505:db:/opt/db:/bin/bash

Which of the following commands would resolve the security issue?

A. usermod -d /srv/www-data www-data && usermod -d /var/lib/db db

B. passwd -u www-data && passwd -u db

C. renice -n 1002 -u 502 && renice -n 1005 -u 505

D. chsh -s /bin/false www-data && chsh -s /bin/false db Most Voted

Correct Answer: D

Community vote distribution


D (100%)

Question #244 Topic 1

A systems administrator is cloning a system partition /dev/sda1 to /dev/sdc1. Which of the following commands would allow the administrator to

accomplish this task most efficiently?

A. dd if=/dev/sda1 of=/dev/sdc1

B. cat /dev/sda1 > /dev/sdc1

C. cp -R /dev/sda1 /dev/sdc1

D. rsync -av /dev/sda1 /dev/sdc1

Correct Answer: A

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 20/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #245 Topic 1

An administrator would like to securely connect to a server and forward port 8080 on a local machine to port 80 on the server. Which of the

following commands should the administrator use to satisfy both requirements?

A. ssh -L 8080:localhost:80 admin@server

B. ssh -R 8080:localhost:80 admin@server

C. ssh -L 80:localhost:8080 admin@server

D. ssh -R 80:localhost:8080 admin@server

Correct Answer: A

Question #246 Topic 1

A Linux administrator needs to transfer a local file named accounts.pdf to a remote /tmp directory of a server with the IP address 10.10.10.80.

Which of the following commands needs to be executed to transfer this file?

A. rsync [email protected]:/tmp accounts.pdf

B. scp accounts.pdf [email protected]:/tmp

C. cp [email protected]:/tmp accounts.pdf

D. ssh accounts.pdf [email protected]:/tmp

Correct Answer: B

Question #247 Topic 1

Application code is stored in Gil. Due to security concerns, the DevOps engineer does not want to keep a sensitive configuration file, app.conf, in

the repository. Which of the following should the engineer do to prevent the file from being uploaded to the repository?

A. Run git exclude app.conf.

B. Run git stash app.conf.

C. Add app.conf to .exclude.

D. Add app.conf to .gitignore.

Correct Answer: D

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 21/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

Question #248 Topic 1

An administrator has source code and needs to rebuild a kernel module. Which of the following command sequences is most commonly used to

rebuild this type of module?

A. ./configure

make

make install

B. wget

gcc

cp

C. tar xvzf

build

cp

D. build

install

configure

Correct Answer: A

Community vote distribution


A (100%)

Question #249 Topic 1

An administrator would like to measure possible packet loss between a workstation and a remote web application that is running on port 443.

Which of the following would be the best command for the administrator to use to display this information?

A. ping -c 50 Most Voted

B. tcpdump -p 443

C. mtr -T -P 443

D. traceroute -p 443

Correct Answer: C

Community vote distribution


C (50%) A (50%)

Question #250 Topic 1

Users in the human resources department are trying to access files in a newly created directory. Which of the following commands will allow the

users access to the files?

A. chattr

B. chgrp

C. chage

D. chcon

Correct Answer: B

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 22/23
10/24/24, 3:59 PM XK0-005 Exam - Free Actual Q&As, Page 5 | ExamTopics

 Previous Questions Next Questions 

Get IT Certification

Unlock free, top-quality video courses on ExamTopics with a simple


registration. Elevate your learning journey with our expertly curated content.
Register now to access a diverse range of educational resources designed for
your success. Start learning today with ExamTopics!

Start Learning for free

https://www.examtopics.com/exams/comptia/xk0-005/view/5/ 23/23

You might also like