17.) Review Flashcards

1
Q

What do you do if a computer won’t boot to login

A
Edit grub with "e". 
Add systemd.unit=emergency.target.
press ctrl+x
# mount -o remount,rw /
# vim /etc/fstab
# systemctl daemon-reload
# systemctl reboot
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

switch to multi-user target

A
# systemctl get-default
# systemctl isolate multi-user.target
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Schedule a recurring job on an hourly bassis between 7-9pm on all days except Saturday and Sunday

A

$ crontab -e
0 19-21 * * Mon-Fri /home/me/run.sh
$ crontab -l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Create a 2GB partition on /dev/vdb

A
# parted /dev/vdb mklabel msdos
# parted /dev/vdb mkpart primary 1GiB 3GiB
# parted /dev/vdb set 1 lvm on
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Create a logical volume called vol_home using a 2GiB partition

A
# pvcreate /dev/vdb1
# vgcreate extra_storage /dev/vdb1
# lvcreate -L 1GiB -n vol_home extra_storage
# mkdir /home
mkfs -t xfs /dev/extra_storage/vol_home
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

persistant mount newly created storage

A
# echo "UUID=88 /home xfs defaults 0 0" /etc/fstab
# mount -a
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

mount network share persistently

A

echo “10.x.x.87:/share /work nfs rw,sync 0 0”&raquo_space; /etc/fstab

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

create 512MiB swap

A
# parted /dev/vdc mklabel msdos
# parted /dev/vdc primary linux-swap 1MiB 513MiB
# mkswap /dev/vdc1
# echo "UUID=888 swap swap defaults 0 0 " >>ftsab
# swapon -a
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

create users Rabbit1,2,3,4and add them to a group Haus

A
# groupadd Haus
# for i in 1 2 3 4; do useradd -G Haus Rabbit$i; done
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

configure /run/volatile to store files. Cleanup every 30 seconds. Permissions 0700

A
# echo "d /run/volatile 0700 root root 30s" >> /etc/tmpfiles.d/volatile.conf
# systemd-tmpfiles --create /etc/tmpfiles.d/volatile.conf
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Configure /home directories to automatically mount

A
# yum install autofs
# echo "/- /etc/auto.moocow" >> /etc/auto.master.d/moo.autofs
# echo "/home/rabbit -rw x.x.x.x:/homedirs/rabbit
# systemctl restart autofs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Retrieve a user’s home direcctory path

A

getent passwd rabbit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Configure SELinux to enable nfs home directories

A

setsebool -P use_nfs_homedirs true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Adjust firewall settings so that SSH connectings are rejected from x.x.x.x

A
# firewall-cmd --add-source=x.x.x.x/32 --zone=block --permanent
# firewall-cmd --reload
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Troubleshoot httpd.service being blocked on port 8080

A
# systemctl status httpd
# sealert -a /var/log/audit/audit.log
# semanage port -a -t http_port_t -p tcp 30080
# systemctl restart httpd
# firewall-cmd --add-port=30080/tcp --permanent
# firewall-cmd --reload
How well did you know this?
1
Not at all
2
3
4
5
Perfectly