Month End Sale Special - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sntaclus

A Linux administrator tries to install Ansible in a Linux environment. One of the steps is to change the owner and the group of the directory /opt/Ansible and its contents. Which of the following commands will accomplish this task?

A.

groupmod -g Ansible -n /opt/Ansible

B.

chown -R Ansible:Ansible /opt/Ansible

C.

usermod -aG Ansible /opt/Ansible

D.

chmod -c /opt/Ansible

A systems administrator is preparing a Linux system for application setup. The administrator needs to create an environment variable with a persistent value in one of the user accounts. Which of the following commands should the administrator use for this task?

A.

export "VAR=SomeValue" >> ~/.ssh/profile

B.

export VAR=value

C.

VAR=value

D.

echo "export VAR=value" >> ~/.bashrc

A Linux administrator wants to make the enable_auth variable set to 1 and available to the environment of subsequently executed commands. Which of the following should the administrator use for this task?

A.

let ENABLE_AUTH=1

B.

ENABLE_AUTH=1

C.

ENABLE_AUTH=$(echo $ENABLE_AUTH)

D.

export ENABLE_AUTH=1

A Linux systems administrator needs to extract the contents of a file named /home/dev/web.bkp to the /var/www/html/ directory. Which of the following commands should the administrator use?

A.

cd /var/www/html/ && gzip -c /home/dev/web.bkp | tar xf -

B.

pushd /var/www/html/ && cpio -idv < /home/dev/web.bkp && popd

C.

tar -c -f /home/dev/web.bkp /var/www/html/

D.

unzip -c /home/dev/web.bkp /var/www/html/

An administrator wants to search a file named myFile and look for all occurrences of strings containing at least five characters, where characters two and five are i, but character three is not b. Which of the following commands should the administrator execute to get the intended result?

A.

grep .a*^b-.a myFile

B.

grep .a., [a] myFile

C.

grepa^b*a myFile

D.

grep .i[^b].i myFile

Which of the following commands should an administrator use to see a full hardware inventory of a Linux system?

A.

dmidecode

B.

lsmod

C.

dmesg

D.

lscpu

A systems administrator receives reports about connection issues to a secure web server. Given the following firewall and web server outputs:

Firewall output:

Status: active

To Action From

443/tcp DENY Anywhere

443/tcp (v6) DENY Anywhere (v6)

Web server output:

tcp LISTEN 0 4096 *:443 :

Which of the following commands best resolves this issue?

A.

ufw disable

B.

ufw allow 80/tcp

C.

ufw delete deny https/tcp

D.

ufw allow 4096/tcp

In the echo "profile-$num-$name" line of a shell script, the variable $num seems to not be expanding during execution. Which of the following notations ensures the value is expanded?

A.

echo "profile-$(num)-$name"

B.

echo 'profile-$num-$name'

C.

echo "profile-'$num'-$name"

D.

echo "profile-${num}-$name"

A Linux administrator just finished setting up passwordless SSH authentication between two nodes. However, upon test validation, the remote host prompts for a password. Given the following logs:

Which of the following is the most likely cause of the issue?

A.

The SELinux policy is incorrectly targeting the unconf ined_u context.

B.

The administrator forgot to restart the SSHD after creating the authorizedjceys file.

C.

The authorized_keys file has the incorrect root permissions assigned.

D.

The authorized_keys file does not have the correct security context to match SELinux policy.

A systems administrator is configuring new Linux systems and needs to enable passwordless authentication between two of the servers. Which of the following commands should the administrator use?

A.

ssh-keygen -t rsa && ssh-copy-id -i ~/.ssh/id_rsa.pub john@server2

B.

ssh-keyscan -t rsa && ssh-copy-id john@server2 -i ~/.ssh/key

C.

ssh-agent -i rsa && ssh-copy-id ~/.ssh/key john@server2

D.

ssh-add -t rsa && scp -rp ~/.ssh john@server2