ExamGecko
Home / CompTIA / XK0-005 / List of questions
Ask Question

CompTIA XK0-005 Practice Test - Questions Answers, Page 3

Add to Whishlist

List of questions

Question 21

Report Export Collapse

Which of the following technologies can be used as a central repository of Linux users and groups?

LDAP
LDAP
MFA
MFA
SSO
SSO
PAM
PAM
Suggested answer: A
Explanation:

LDAP stands for Lightweight Directory Access Protocol, which is a protocol for accessing and managing a central directory of users and groups. LDAP can be used as a central repository of Linux users and groups, allowing for centralized authentication and authorization across multiple Linux systems. MFA, SSO, and PAM are not technologies that can be used as a central repository of Linux users and groups. MFA stands for Multi-Factor Authentication, which is a method of verifying a user's identity using more than one factor, such as a password, a token, or a biometric. SSO stands for Single Sign-On, which is a feature that allows a user to log in once and access multiple applications or systems without having to re-enter credentials. PAM stands for Pluggable Authentication Modules, which is a framework that allows Linux to use different authentication methods, such as passwords, tokens, or biometrics. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 8: Managing Users and Groups

asked 02/10/2024
Cesar Castillo
35 questions

Question 22

Report Export Collapse

A systems administrator is troubleshooting connectivity issues and trying to find out why a Linux server is not able to reach other servers on the same subnet it is connected to. When listing link parameters, the following is presented:

CompTIA XK0-005 image Question 22 99663 10022024175436000000

Based on the output above, which of following is the MOST probable cause of the issue?

The address ac:00:11:22:33:cd is not a valid Ethernet address.
The address ac:00:11:22:33:cd is not a valid Ethernet address.
The Ethernet broadcast address should be ac:00:11:22:33:ff instead.
The Ethernet broadcast address should be ac:00:11:22:33:ff instead.
The network interface eth0 is using an old kernel module.
The network interface eth0 is using an old kernel module.
The network interface cable is not connected to a switch.
The network interface cable is not connected to a switch.
Suggested answer: D
Explanation:

The most probable cause of the connectivity issue is that the network interface cable is not connected to a switch. This can be inferred from the output of the ip link list dev eth0 command, which shows that the network interface eth0 has the NO-CARRIER flag set. This flag indicates that there is no physical link detected on the interface, meaning that the cable is either unplugged or faulty. The other options are not valid causes of the issue. The address ac:00:11:22:33:cd is a valid Ethernet address, as it follows the format of six hexadecimal octets separated by colons. The

Ethernet broadcast address should be ff:ff:ff:ff:ff:ff, which is the default value for all interfaces. The network interface eth0 is not using an old kernel module, as it shows the UP flag, which indicates that the interface is enabled and ready to transmit data. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 14: Managing Networking

asked 02/10/2024
Jonathan Tang
46 questions

Question 23

Report Export Collapse

A Linux administrator was asked to run a container with the httpd server inside. This container should be exposed at port 443 of a Linux host machine while it internally listens on port 8443. Which of the following commands will accomplish this task?

podman run -d -p 443:8443 httpd
podman run -d -p 443:8443 httpd
podman run -d -p 8443:443 httpd
podman run -d -p 8443:443 httpd
podman run -d -e 443:8443 httpd
podman run -d -e 443:8443 httpd
podman exec -p 8443:443 httpd
podman exec -p 8443:443 httpd
Suggested answer: A
Explanation:

The command that will accomplish the task of running a container with the httpd server inside and exposing it at port 443 of the Linux host machine while it internally listens on port 8443 is podman run -d -p 443:8443 httpd. This command uses the podman tool, which is a daemonless container engine that can run and manage containers on Linux systems. The -d option runs the container in detached mode, meaning that it runs in the background without blocking the terminal. The -p option maps a port on the host machine to a port inside the container, using the format host_port:container_port. In this case, port 443 on the host machine is mapped to port 8443 inside the container, allowing external access to the httpd server. The httpd argument specifies the name of the image to run as a container, which in this case is an image that contains the Apache HTTP Server software. The other options are not correct commands for accomplishing the task. Podman run -d -p 8443:443 httpd maps port 8443 on the host machine to port 443 inside the container, which does not match the requirement. Podman run -d -e 443:8443 httpd uses the -e option instead of the -p option, which sets an environment variable inside the container instead of mapping a port. Podman exec -p 8443:443 httpd uses the podman exec command instead of the podman run command, which executes a command inside an existing container instead of creating a new one. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Automating Tasks

asked 02/10/2024
Filippo Bertuzzi
37 questions

Question 24

Report Export Collapse

A Linux administrator needs to analyze a failing application that is running inside a container. Which of the following commands allows the Linux administrator to enter the running container and analyze the logs that are stored inside?

docker run -ti app /bin/sh
docker run -ti app /bin/sh
podman exec -ti app /bin/sh
podman exec -ti app /bin/sh
podman run -d app /bin/bash
podman run -d app /bin/bash
docker exec -d app /bin/bash
docker exec -d app /bin/bash
Suggested answer: B
Explanation:

Podman exec -ti app /bin/sh allows the Linux administrator to enter the running container and analyze the logs that are stored inside. This command uses the podman tool, which is a daemonless container engine that can run and manage containers on Linux systems. The exec option executes a command inside an existing container, in this case app, which is the name of the container that runs the failing application. The -ti option allocates a pseudo-TTY and keeps STDIN open, allowing for interactive shell access to the container. The /bin/sh argument specifies the shell command to run inside the container, which can be used to view and manipulate the log files.

The other options are not correct commands for entering a running container and analyzing the logs.

Docker run -ti app /bin/sh creates a new container from the app image and runs the /bin/sh command inside it, but does not enter the existing container that runs the failing application.

Podman run -d app /bin/bash also creates a new container from the app image and runs the /bin/bash command inside it, but does so in detached mode, meaning that it runs in the background without interactive shell access. Docker exec -d app /bin/bash executes the /bin/bash command inside the existing app container, but also does so in detached mode, without interactive shell access.

Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Automating Tasks; View container logs | Docker Docs; How to see the logs of a docker container - Stack Overflow

asked 02/10/2024
Oleksii Derevianchenko
40 questions

Question 25

Report Export Collapse

A systems administrator needs to clone the partition /dev/sdc1 to /dev/sdd1. Which of the following commands will accomplish this task?

tar -cvzf /dev/sdd1 /dev/sdc1
tar -cvzf /dev/sdd1 /dev/sdc1
rsync /dev/sdc1 /dev/sdd1
rsync /dev/sdc1 /dev/sdd1
dd if=/dev/sdc1 of=/dev/sdd1
dd if=/dev/sdc1 of=/dev/sdd1
scp /dev/sdc1 /dev/sdd1
scp /dev/sdc1 /dev/sdd1
Suggested answer: C
Explanation:

The command dd if=/dev/sdc1 of=/dev/sdd1 copies the data from the input file (if) /dev/sdc1 to the output file (of) /dev/sdd1, byte by byte. This is the correct way to clone a partition. The other options are incorrect because they either compress the data (tar -cvzf), synchronize the files (rsync), or copy the files over a network (scp), which are not the same as cloning a partition. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 10: Managing Storage, page 321.

asked 02/10/2024
Heidar Heidari nia
41 questions

Question 26

Report Export Collapse

When trying to log in remotely to a server, a user receives the following message:

CompTIA XK0-005 image Question 26 99667 10022024175436000000

The server administrator is investigating the issue on the server and receives the following outputs:

CompTIA XK0-005 image Question 26 99667 10022024175436000000

Which of the following is causing the issue?

The wrong permissions are on the user's home directory.
The wrong permissions are on the user's home directory.
The account was locked out due to three failed logins.
The account was locked out due to three failed logins.
The user entered the wrong password.
The user entered the wrong password.
The user has the wrong shell assigned to the account.
The user has the wrong shell assigned to the account.
Suggested answer: D
Explanation:

The user has the wrong shell assigned to the account, which is causing the issue. The output 1 shows that the user's shell is set to /bin/false, which is not a valid shell and will prevent the user from logging in. The output 2 shows that the user's home directory has the correct permissions (drwxr-xrx), and the output 3 shows that the user entered the correct password and was accepted by the SSH daemon, but the session was closed immediately due to the invalid shell. The other options are incorrect because they are not supported by the outputs. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Network Services, page 413.

asked 02/10/2024
Ana Roque
40 questions

Question 27

Report Export Collapse

A new Linux systems administrator just generated a pair of SSH keys that should allow connection to the servers. Which of the following commands can be used to copy a key file to remote servers?

(Choose two.)

wget
wget
ssh-keygen
ssh-keygen
ssh-keyscan
ssh-keyscan
ssh-copy-id
ssh-copy-id
ftpd
ftpd
scp
scp
Suggested answer: D, F
Explanation:

The commands ssh-copy-id and scp can be used to copy a key file to remote servers. The command ssh-copy-id copies the public key to the authorized_keys file on the remote server, which allows the user to log in without a password. The command scp copies files securely over SSH, which can be used to transfer the key file to any location on the remote server. The other options are incorrect because they are not related to copying key files. The command wget downloads files from the web, the command ssh-keygen generates key pairs, the command ssh-keyscan collects public keys from remote hosts, and the command ftpd is a FTP server daemon. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Network Services, pages 408-410.

asked 02/10/2024
Dmitrii Nikolaevich
42 questions

Question 28

Report Export Collapse

A systems administrator needs to reconfigure a Linux server to allow persistent IPv4 packet forwarding. Which of the following commands is the correct way to accomplish this task?

echo 1 > /proc/sys/net/ipv4/ipv_forward
echo 1 > /proc/sys/net/ipv4/ipv_forward
sysctl -w net.ipv4.ip_forward=1
sysctl -w net.ipv4.ip_forward=1
firewall-cmd --enable ipv4_forwarding
firewall-cmd --enable ipv4_forwarding
systemctl start ipv4_forwarding
systemctl start ipv4_forwarding
Suggested answer: B
Explanation:

The command sysctl -w net.ipv4.ip_forward=1 enables IPv4 packet forwarding temporarily by setting the kernel parameter net.ipv4.ip_forward to 1. To make this change persistent, the administrator needs to edit the file /etc/sysctl.conf and add the line net.ipv4.ip_forward = 1. The other options are incorrect because they either use the wrong file (/proc/sys/net/ipv4/ipv_forward), the wrong command (firewall-cmd or systemctl), or the wrong option (--enable or start). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 12: Managing Network Connections, page 378.

asked 02/10/2024
Abraham Ermann
47 questions

Question 29

Report Export Collapse

A Linux administrator would like to use systemd to schedule a job to run every two hours. The administrator creates timer and service definitions and restarts the server to load these new configurations. After the restart, the administrator checks the log file and notices that the job is only running daily. Which of the following is MOST likely causing the issue?

The checkdiskspace.service is not running.
The checkdiskspace.service is not running.
The checkdiskspace.service needs to be enabled.
The checkdiskspace.service needs to be enabled.
The OnCalendar schedule is incorrect in the timer definition.
The OnCalendar schedule is incorrect in the timer definition.
The system-daemon services need to be reloaded.
The system-daemon services need to be reloaded.
Suggested answer: C
Explanation:

The OnCalendar schedule is incorrect in the timer definition, which is causing the issue. The OnCalendar schedule defines when the timer should trigger the service. The format of the schedule is OnCalendar=<year>-<month>-<day> <hour>:<minute>:<second>. If any of the fields are omitted, they are assumed to be *, which means any value. Therefore, the schedule OnCalendar=*-*-* 00:00:00 means every day at midnight, which is why the job is running daily. To make the job run every two hours, the schedule should be OnCalendar=*-*-* *:00:00/2, which means every hour divisible by 2 at the start of the minute. The other options are incorrect because they are not related to the schedule. The checkdiskspace.service is running, as shown by the output of systemctl status checkdiskspace.service. The checkdiskspace.service is enabled, as shown by the output of systemctl is-enabled checkdiskspace.service. The system-daemon services do not need to be reloaded, as the timer and service definitions are already loaded by the restart. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 14: Managing Processes and Scheduling Tasks, page 437.

asked 02/10/2024
Shafqat Balouch
33 questions

Question 30

Report Export Collapse

An administrator deployed a Linux server that is running a web application on port 6379/tcp.

SELinux is in enforcing mode based on organization policies.

The port is open on the firewall.

Users who are trying to connect to a local instance of the web application receive Error 13, Permission denied.

The administrator ran some commands that resulted in the following output:

CompTIA XK0-005 image Question 30 99671 10022024175436000000

Which of the following commands should be used to resolve the issue?

semanage port -d -t http_port_t -p tcp 6379
semanage port -d -t http_port_t -p tcp 6379
semanage port -a -t http_port_t -p tcp 6379
semanage port -a -t http_port_t -p tcp 6379
semanage port -a http_port_t -p top 6379
semanage port -a http_port_t -p top 6379
semanage port -l -t http_port_tcp 6379
semanage port -l -t http_port_tcp 6379
Suggested answer: B
Explanation:

The command semanage port -a -t http_port_t -p tcp 6379 adds a new port definition to the SELinux policy and assigns the type http_port_t to the port 6379/tcp. This allows the web application to run on this port and accept connections from users. This is the correct way to resolve the issue. The other options are incorrect because they either delete a port definition (-d), use the wrong protocol (top instead of tcp), or list the existing port definitions (-l). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Securing Linux Systems, page 535.

asked 02/10/2024
Yogen Trikannad
40 questions
Total 407 questions
Go to page: of 41
Search

Related questions