241-250 Flashcards
A Linux administrator deployed a large-scale application service as a containerized pod. The Linux administrator needs to continually send the application’s log file to the company’s central log store. Which of the following should the Linux administrator do to efficiently perform this task?
A. Configure a sidecar to perform log shipping.
B. Run docker exec to access the logs within the container.
C. Execute docker inspect and run a log rsync replication.
D. Set up a custom task scheduler via kubectl.
A. Configure a sidecar to perform log shipping.
A systems administrator is trying to track down a rogue process that has a TCP listener on a network interface for remote command-and-control instructions. Which of the following commands should the systems administrator use to generate a list of rogue process names? (Choose two.)
A. netstat -antp | grep LISTEN
B. lsof -iTCP | grep LISTEN
C. lsof -i:22 | grep TCP
D. netstat -a | grep TCP
E. nmap -p1-65535 | grep -i tcp
F. nmap -sS 0.0.0.0/0
A. netstat -antp | grep LISTEN
B. lsof -iTCP | grep LISTEN
A Linux engineer finds multiple failed login entries in the security log file for application users. The Linux engineer performs a security audit and discovers a security issue. Given the following:
grep -iE ‘www|db’ /etc/passwd
www-data:x:502:502:www-data:/var/www:/bin/bash
db:x:505:505:db:/opt/db:/bin/bash
Which of the following commands would resolve the security issue?
A. usermod -d /srv/www-data www-data && usermod -d /var/lib/db db
B. passwd -u www-data && passwd -u db
C. renice -n 1002 -u 502 && renice -n 1005 -u 505
D. chsh -s /bin/false www-data && chsh -s /bin/false db
D. chsh -s /bin/false www-data && chsh -s /bin/false db
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?
A. dd if=/dev/sda1 of=/dev/sdc1
B. cat /dev/sda1 > /dev/sdc1
C. cp -R /dev/sda1 /dev/sdc1
D. rsync -av /dev/sda1 /dev/sdc1
A. dd if=/dev/sda1 of=/dev/sdc1
An administrator would like to securely connect to a server and forward port 8080 on a local machine to port 80 on the server. Which of the following commands should the administrator use to satisfy both requirements?
A. ssh -L 8080:localhost:80 admin@server
B. ssh -R 8080:localhost:80 admin@server
C. ssh -L 80:localhost:8080 admin@server
D. ssh -R 80:localhost:8080 admin@server
A. ssh -L 8080:localhost:80 admin@server
A Linux administrator needs to transfer a local file named accounts.pdf to a remote /tmp directory of a server with the IP address 10.10.10.80. Which of the following commands needs to be executed to transfer this file?
A. rsync user@l0.10.10.80:/tmp accounts.pdf
B. scp accounts.pdf user@l0.10.10.80:/tmp
C. cp user@l0.10.10.80:/tmp accounts.pdf
D. ssh accounts.pdf user@l0.10.10.80:/tmp
B. scp accounts.pdf user@l0.10.10.80:/tmp
Application code is stored in Gil. Due to security concerns, the DevOps engineer does not want to keep a sensitive configuration file, app.conf, in the repository. Which of the following should the engineer do to prevent the file from being uploaded to the repository?
A. Run git exclude app.conf.
B. Run git stash app.conf.
C. Add app.conf to .exclude.
D. Add app.conf to .gitignore.
D. Add app.conf to .gitignore.
An administrator has source code and needs to rebuild a kernel module. Which of the following command sequences is most commonly used to rebuild this type of module?
A.
./configure
make
make install
B.
wget
gcc
cp
C.
tar xvzf
build
cp
D.
build
install
configure
A.
./configure
make
make install
An 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?
A. ping -c 50
B. tcpdump -p 443
C. mtr -T -P 443
D. traceroute -p 443
C. mtr -T -P 443
Users in the human resources department are trying to access files in a newly created directory. Which of the following commands will allow the users access to the files?
A. chattr
B. chgrp
C. chage
D. chcon
B. chgrp