CompTIA XK0-005 Practice Test - Questions Answers, Page 37
List of questions
Related questions
A Linux administrator is enabling root log-in over SSH on a server. Which of the following combinations of files and parameters should the administrator modify to accomplish this task?
/etc/ssh/ssh_config - PermitRootLogin
/etc/ssh/ssh_config - AllowRootLogin
/etc/ssh/sshd_config - PermitRootLogin
/etc/ssh/sshd_config - AllowRootLogin
An administrator changed the default port of an SSH server to 2222 on myhost, and clients are not able to connect. The administrator runs some commands and receives the following output:
vbnet
Copy code
$ ssh -p 2222 myhost
ssh:connect to host myhost on port 2222: No route to host
Which of the following commands should be run on myhost?
firewall-cmd --zone=public --add-service=ssh
firewall-cmd --zone=public --add-port=2222
iptables --zone=public --add-service=ssh
iptables --zone=public --add-port=2222
An administrator wants to execute a long-running script in the terminal while troubleshooting another issue. Which of the following options will achieve this goal?
bash script.sh &
source script.sh
sh script.sh | jobs
nice -10 ./script.sh
A Linux administrator is investigating the reason a systemd timer is not running every night at midnight. The administrator sees the following unit file:
[Unit]
Description=Execute backup every day at midnight
[Timer]
OnCalendar=--01 00:00:00
Unit=backup.service
RandomizedDelaySec=10800
[Install]
WantedBy=multi-user.target
Which of the following modifications should the administrator make in the unit file? (Select two).
Remove RandomizedDelaySec=10800.
Add WakeSystem=Midnight.
Change OnCalendar to 00:00:00.
Add OnCalendar=--* daily.
Add AccuracySec=1.
Remove OnCalendar=--01 00:00:00.
A Linux systems administrator needs to compress a file named passwords.txt. The compressed file should be saved as passwords.txt.gz. Which of the following commands should the administrator use to accomplish this task?
gzip -c passwords.txt > passwords.txt.gz
gzip -d passwords.txt | passwords.txt.gz
gzip -n passwords.txt > passwords.txt.gz
gzip -n passwords.txt < passwords.txt.gz
Users are reporting that a Linux server is responding slowly. A systems administrator troubleshooting the server issue sees the following iostat output, with %iowait at 50.38. Which of the following is most likely the issue?
The CPU is mostly waiting for I/O operations.
/ filesystem does not have enough storage allocated.
/var filesystem is almost full.
The CPU capacity is inadequate.
A diagnostic tool reports a 'host seems down' event for a server with an IP address of 192.168.47.44. Which of the following commands should the administrator use to confirm the host down event?
nmap 192.168.47.0/32
netcat 192.168.47.44
nmap 192.168.47.44 -Pn
ping -c 1 192.168.47.44
A Linux engineer wants to give read-write-execute permissions for the cloud_users directory to user Oliver. Which of the following commands should the engineer use?
setfacl -L Oliver /cloud_users
setfacl -x rwx /cloud_users
setfacl -P rwx /cloud_users
setfacl -m u:Oliver /cloud_users
A Linux systems administrator is updating code. After completing the update, the administrator wants to publish the updated code without including the configuration files. Which of the following should the administrator use to accomplish this task?
git clone
git -
.gitignore
git fetch
A Linux administrator is creating a user that can run the FTP service but cannot log in to the system. The administrator sets /bin/false as a login shell for the user. When the user tries to run the FTP service, it is rejected with an 'invalid shell: /bin/false' message. Which of the following is the best way to resolve the issue?
Change ownership of /bin/false to the FTP user
Add /bin/false entry to the /etc/shells file
Make /bin/false an executable file
Change the user's default shell to /bin/bash
Question