61-70 Flashcards
A Linux administrator is trying to remove the ACL from the file /home/user/data. txt but receives the following error message:
/dev/mapper/linux-home on /home type xfs (rw,relatime,seclabel,attr2,inode64,usrquota)
-rw-rw-r–+ 1 user staff 2354 Sep 15 16:33 data.txt
-rw-rw-r–+ user staff unconfined_u:object_r:user_home_t:s0 data.txt
files: data.txt
# owner: user
# group: staff
user::rw-
user:accounting:rw-
group::r-
mask::rw-
other::r-
Attributes:
——–a——————
Which of the following is causing the error message?
A. The administrator is not using a highly privileged account.
B. The filesystem is mounted with the wrong options.
C. SELinux file context is denying the ACL changes.
D. File attributes are preventing file modification.
D. File attributes are preventing file modification.
A Linux administrator needs to create a new cloud.cpio archive containing all the files from the current directory. Which of the following commands can help to accomplish this task?
A. ls | cpio -iv > cloud.epio
B. ls | cpio -iv < cloud.epio
C. ls | cpio -ov > cloud.cpio
D. ls cpio -ov < cloud.cpio
C. ls | cpio -ov > cloud.cpio
A systems administrator made some changes in the ~/.bashrc file and added an alias command. When the administrator tried to use the alias command, it did not work. Which of the following should be executed FIRST?
A. source ~/.bashrc
B. read ~/.bashrc
C. touch ~/.bashrc
D. echo ~/.bashrc
A. source ~/.bashrc
A junior systems administrator has just generated public and private authentication keys for passwordless login. Which of the following files will be moved to the remote servers?
A. id_dsa.pem
B. id_rsa
C. id_ecdsa
D. id_rsa.pub
D. id_rsa.pub
ls -al /dev/disk/by-uuid/
A Linux administrator cloned an existing Linux server and built a new server from that clone. The administrator encountered the following error after booting the cloned server:
Device mismatch detected
The administrator performed the commands listed below to further troubleshoot and mount the missing filesystem:
total 0
drwxr-xr-x 2 root 220 Jul 08:59 .
drwxr-xr-x 2 root 160 Jul 08:59 ..
1rwxrwxrwx 1 root 26 Jul 11:10 2251a54-6c14-9187-df8629373 -> ../../sdb
1rwxrwxrwx 1 root 26 Jul 11:10 4211c54-2a13-7291-bd8629373 -> ../../sdc
1rwxrwxrwx 1 root 26 Jul 11:10 3451b54-6d10-3561-ad8629373 -> ../../sdd
Which of the following should administrator use to resolve the device mismatch issue and mount the disk?
A. mount disk by device-id
B. fsck -A
C. mount disk by-label
D. mount disk by-blkid
D. mount disk by-blkid
A systems administrator installed a new software program on a Linux server. When the systems administrator tries to run the program, the following message appears on the screen.
Hardware virtualization support is not available on this system.
Either is not present or disabled in the system’s BIOS
Which of the following commands will allow the systems administrator to check whether the system supports virtualization?
A. dmidecode -s system-version
B. lscpu
C. sysctl -a
D. cat /sys/device/system/cpu/possible
B. lscpu
A Linux administrator created the directory /project/access2all. By creating this directory, the administrator is trying to avoid the deletion or modification of files from non-owners. Which of the following will accomplish this goal?
A. chmod +t /project/access2all
B. chmod +rws /project/access2all
C. chmod 2770 /project/access2all
D. chmod ugo+rwx /project/access2all
A. chmod +t /project/access2all
A Linux systems administrator needs to persistently enable IPv4 forwarding in one of the Linux systems. Which of the following commands can be used together to accomplish this task? (Choose two.)
A. sysctl net.ipv4.ip_forward
B. sysctl -w net.ipv4.ip_forward=1
C. echo “net.ipv4.ip_forward=1”»_space; /etc/sysctl.conf
D. echo 1 > /proc/sys/net/ipv4/ip_forward
E. sysctl –p
F. echo “net.ipv6.conf.all.forwarding=l”»_space; /etc/sysctl.conf
B. sysctl -w net.ipv4.ip_forward=1 Most Voted
C. echo “net.ipv4.ip_forward=1”»_space; /etc/sysctl.conf
Due to low disk space, a Linux administrator finding and removing all log files that were modified more than 180 days ago. Which of the following commands will accomplish this task?
A. find /var/log -type d -mtime +180 -print -exec rm {} \;
B. find /var/log -type f -modified +180 -rm
C. find /var/log -type f -mtime +180 -exec rm {} \
D. find /var/log -type c -atime +180 –remove
A. find /var/log -type d -mtime +180 -print -exec rm {} \;
A junior administrator is setting up a new Linux server that is intended to be used as a router at a remote site. Which of the following parameters will accomplish this goal?
A.
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -i eth0 -j MASQUERADE
B.
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
C.
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
D.
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -o eth0 -j MASQUERADE
A.
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -i eth0 -j MASQUERADE