deck 6 Flashcards

1
Q

chage -d 0 user. The 0 requires user to…

Shift +…in vim allows inserting character at end of current line

terraform….allows validating changes before cloud deployment

A

-change password at next login

-A

-plan

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

When enabling LUKS on a usb and mount options show as null, run

-unmount, fsck, and cryptsetup….

to maintain least priv while give a user permission to do a specific something that requires escalation, put them in a group that has those privs and put that group in the….

A

-luksFormat

-custom .conf file

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

lv….. makes a logical volume larger OR smaller. lvextend ONLY makes volume bigger

journalctl -xu can be used to query systemd for MORE details than systemctl status about a…

A

-lvresize

-failing service

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

sysctl -a displays….

…..containers allow same container configs across different enviroments/deploymens

A

-kernel parameter at runtime

-ambassador

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

overlay networks allow containers to…

use…command to troubleshoot socket issues

A

-communicate with each other

-ss (socket stats)

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

if visudo shows a lock on the root account (can’t use it) best course is ….

accounting ALL=/opt/acc/report. break it down

*for ALL, you could choose a different host (localhost, etc)

A

boot in single user mode, comment out bad line

-the user (accounting), on ALL host, can use /opt/acc/report as root

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

To ensure a script runs only in console mode, switch to isolate…., run script, then switch back to graphical if needed

if using an netstat -s and lots of packets are dropping, increase rmem_max and wmem_max by 12500000

A

-multi-user.target

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

when updating bind, look at….file to review default config

rpmsave saves what?

A

-rpmnew

-prior default configuration before a BIND update

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

Ufw status and firewall-cmd - -list-all show what?

modprobe and insmod both load modules into kernel BUT modprobe ALSO…

A

-all active firewall rules

-handles/loads dependencies

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

use….with containers like docker and such to send app logs to a log store

netstat -antp and lsof ….. can be used with grep LISTEN to find ports that are in a listening state

A

-sidecars

-iTCP

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

service accounts like www-data and db should NOT have…

for port forwarding with ssh, use ssh -L with the port that will be forwarding first and then the receiving port 2nd

A

-shell access

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

du -… shows specifics on files using up disk space

ansible is agentless

….files shouldn’t be stored in var because if log files fill up var it might corrupt the database

A

-a

-database

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

makes comments. yaml or json?

…..can be used to allocate space for a swap file, for instance

A

-yaml

-fallocate

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

order for swap space is: fallocate, mkswap, and…

anaconda-ks.cfg (kickstart) is used to…

A

swapon -a

-automate installs

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

to view status of background jobs, use killall -….

sigterm does what?

rm -f removes with no confirmation

A

-usr1

-gracefully kill a process

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

in tar, to bzip (high compression), use-…flag. -z flag uses…compression

-x does what in tar?
s
umask is 777 for directories, 666 for files

A

-j
-gzip
-extract

17
Q

best command to diagnose why space not recovered after file deletion is….because it shows processes holding open files

first program booted by sysV init?

A

-lsof

-/sbin/init

18
Q

difference between bg and &?

….brings background job to foreground

A

-& starts a process in the backgrund, bg resumes stopped processes in background

-fg

19
Q

…..command runs even after user who ran it logs out or connection drops

a 403 error code for a web server is a local error and might mean a web server can’t access a local directory

A

-nohup

20
Q

x11 provides….

to disable key sequences like ctrl alt del, comment them out in the…file. this file is always first to boot.

A

-graphics

initab file (in etc)

21
Q

~/bash_profile contains info specific to a user

etc/profile is system wide and applies to ALL users

A

-

22
Q

/etc/securetty is used to specifiy?

boot order

1.bios/uefi
2.bootloader
3.kernel
4.init or systemd (first user space)
5.others

A

-systems suitable for root login

23
Q

never set default run level to either 0 (shutdown) or…

AVC in da log means SELinux.

A

-6 (restart)

24
Q

setsebool changes boolean values in SELinux to either on/off. -…flag makes it persistent

-Wayland does what?

GRUB2 IS A BOOTLOADER!

A

-P

-replaces X11 (graphical). Used for display servers

25
Q

/proc exist only in …..and dynamically changes

modprobe -… removes. rmmod does that as well

A

-memory

-r

26
Q

in iptables, drop does not send a message back, but…does (if it says connection refused)

….servers collect status and performance info about servers in an enviroment

A

-reject

monitoring

27
Q

in iptables, what two commands should you use with cstate (connection state) and what are they used for?

A

-new=rule applies to new connections, established= only established connections. can use one or a combo of both as needed

28
Q

directories (777) NEED execute privileges. FILES (666) DO NOT

iptables -…puts entry at TOP of file, -A puts at end of file.

A

-I

29
Q

kill -hup can be used update a process while its running without killing it

/etc/…. creates a template for new users

A

-/etc/skel

30
Q

…..a module prevents it from being loaded into the kernel

docker image load does what?

A

-blacklisting

-loads image from a tar file

31
Q

docker image….creates image from a tarball

docker image build creates images from a Dockerfile

A

-import

32
Q

ansible starts of with three — and is indented

terraform uses {} and =’s

A
33
Q

rpm -qa shows ALL installed packages. what shows just specific ones?

rpm -i INSTALLS packages

A

-rpm -qf

34
Q

rpm -q package name shows?

rpm -qf shows what?

A

-if a package is installed

-what package a FILE came from

35
Q

partprobe is used to update kernel when a…

sysctl specifies kernel parameters. Systemd works in units and deals with mount points, services, etc.

A

-partition table is changed

36
Q

when applying changes to sysctl.conf (like ip forwarding for example), you can make them persistent by using sysctl….

A

-p