Pass the CompTIA Linux+ XK0-005 Questions and answers with CertsForce

Viewing page 15 out of 15 pages
Viewing questions 141-150 out of questions
Questions # 141:

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 follow-ing should the user execute in

order for the script to run properly?

Options:

A.

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


B.

chmod 600 /home/user/script . sh


C.

chmod /home/user/script . sh


D.

chmod 0+r /horne/user/script. sh


Expert Solution
Questions # 142:

A systems administrator detected corruption in the /data filesystem. Given the following output:

Which of the following commands can the administrator use to best address this issue?

Options:

A.

umount /data mkfs . xfs /dev/sclcl mount /data


B.

umount /data xfs repair /dev/ sdcl mount /data


C.

umount /data fsck /dev/ sdcl mount / data


D.

umount /data pvs /dev/sdcl mount /data


Expert Solution
Questions # 143:

A systems administrator is tasked with setting up key-based SSH authentication. In which of the following locations should the administrator place the public keys for the server?

Options:

A.

~/.sshd/authkeys


B.

~/.ssh/keys


C.

~/.ssh/authorized_keys


D.

~/.ssh/keyauth


Expert Solution
Questions # 144:

A systems administrator is troubleshooting a connectivity issue pertaining to access to a system named db.example.com. The system IP address should be 192.168.20.88. The administrator issues the dig command and receives the following output:

The administrator runs grep db.example.com /etc/hosts and receives the following output:

Given this scenario, which of the following should the administrator do to address this issue?

Options:

A.

Modify the /etc/hosts file and change the db.example.com entry to 192.168.20.89.


B.

Modify the /etc/network file and change the db.example.com entry to 192.168.20.88.


C.

Modify the /etc/network file and change the db.example.com entry to 192.168.20.89.


D.

Modify the /etc/hosts file and change the db.example.com entry to 192.168.20.88.


Expert Solution
Questions # 145:

Joe, a user, is unable to log in to the Linux system. Given the following output:

Which of the following commands would resolve the issue?

Options:

A.

usermod -s /bin/bash joe


B.

pam_tally2 -u joe -r


C.

passwd -u joe


D.

chage -E 90 joe


Expert Solution
Questions # 146:

A Linux administrator needs to create a new user named user02. However, user02 must be in a different home directory, which is under /comptia/projects. Which of the following commands will accomplish this task?

Options:

A.

useradd -d /comptia/projects user02


B.

useradd -m /comptia/projects user02


C.

useradd -b /comptia/projects user02


D.

useradd -s /comptia/projects user02


Expert Solution
Viewing page 15 out of 15 pages
Viewing questions 141-150 out of questions