CompTIA XK0-005 Practice Test - Questions Answers, Page 34
List of questions
Related questions
A Linux 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?
ping -c 50 <remote server IP>
tcpdump -p 443 <remote server IP>
mtr -T -P 443 <remote server IP>
traceroute -p 443 <remote server IP>
A systems engineer deploys a new application server, but the server cannot communicate with the back-end database hostname. The engineer confirms that the application server can ping the database server's IP address. Which of the following is the most likely cause of the issue?
Incorrect DNS servers
Unreachable default gateway
Missing route configuration
Misconfigured subnet mask
A Linux administrator needs to list the packages that are currently installed on a server. Which of the following commands should the administrator use?
snap install list
snap list
snap show
snap packages
A hardened physical Linux system allows regular, unprivileged users to remotely connect to the server using SSH only. No sudo tool has been installed. Which of the following should the Linux administrator use to perform administrative tasks on this host? (Select two).
Create an SSH key and copy it to the remote server to allow passwordless login
Access the server's physical console and use the root user's password to log in
Install the telnet server on this system to be able to use a root account
Use the su command and enter the root user's password
Install the sudo command using the unprivileged user's account
Add the user to the wheel group
A systems administrator is creating new user accounts on several Linux machines and wants to automate the process from a Linux system used for operations. In this operations system, the list of servers is located in the /home/user/serverslist file and the list of user accounts is located in the /home/user/userslist file. Which of the following scripts will help accomplish this task?
bash for server in $(cat /home/user/serverslist) do for user in $(cat /home/user/userslist) do sudo useradd $user done done
bash for server in $(cat /home/user/serverslist) do ssh -i user@$server 'for user in $(cat /home/user/userslist) do sudo useradd $user done; exit' done
bash for server in $(cat /home/user/serverslist) do scp /home/user/userslist user@$server:/tmp ssh -i user@$server 'for user in $(cat /tmp/userslist) do sudo useradd $user done; exit' done
bash ssh user@$(cat /home/user/serverslist) 'sudo useradd $(cat /home/user/userslist); exit'
Which of the following directories contains binaries that only a root user should run?
/sbin
/bin
/root
/lib
SIMULATION
A senior administrator has placed a private key for user admin in your home directory.
The server you need to remotely access is server1 and SSH is listening on port 2222.
INSTRUCTIONS
Part 1
Review the command output and build the correct command to place the private key into your SSH folder.
Part 2
Review the command output and build the correct command to set the file permissions.
Part 3
Review the command output and build the correct command to set the correct ownership.
In each part, click on objects to build a complete command. Command objects may be used more than once, but not all will be used. Use _ as the spacebar. Click the arrow to remove any unwanted objects from your command.
Part 4
Select the proper file to edit for remote server access. Then, build the correct configuration output based on the server name, ports, and files.
See the Explanation part for detailed answer of each part
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?
dd if=/dev/sda1 of=/dev/sdc1
cat /dev/sda1 > /dev/sdc1
cp -R /dev/sda1 /dev/sdc1
rsync -av /dev/sda1 /dev/sdc1
A Linux administrator encounters the following error in the Apache log files:
css
SQLSTATE[HY000] [2002] Permission denied
Which of the following commands should the administrator run to safely fix this issue?
chcon -c httpd_sys_content_t /home/apache
setsebool -F httpd_can_network_connect_db on
setenforce 0
touch /.autorelabel
A hardened physical Linux system allows regular, unprivileged users to remotely connect to the server using SSH only. No sudo tool has been installed. Which of the following should the Linux administrator use to perform administrative tasks on this host? (Select two).
Create an SSH key and copy it to the remote server to allow passwordless login
Access the server's physical console and use the root user's password to log in
Install the telnet server on this system to be able to use a root account
Use the su command and enter the root user's password
Install the sudo command using the unprivileged user's account
Add the user to the wheel group
Question