EXAM DECK Flashcards

1
Q

where is umask?
find processes by user?
find a service. NOW

A

bashrc
ps -u username
systemctl list-unit-files –type=service

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

do cronjob at 1330 everyday
do a cronjob mon-friday anytime
do a cronjob mon-friday 1330

cronjob order: minute, hour, day, month, week

A

30 13 * * * /file
* * * * 1-5 /file
30 13 * * 1-5 /file

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

to create a logrotate file for something, use logrotate.conf to view syntax. Can find it w/locate

*.err
*.emerg

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

resize a lv AND filesystem
resize extents AND filesystem

DONT FORGET THE FUCKING R YOU RETARD!!!!!

if asked to create logrotate files, reference logrotate.conf for available options, and files in logrotate.d for SYNTAX

A

lvextend -r -L +#M/G /dev/vg/lg
lvextend -r -l +#M/G /dev/vg/lg

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

Change uid

Add user to sec group

A

Useradd -u ### user

Useradd -G group user

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

Make sure nfs-server is ENABLE AND STARTED!!!!

getenforce 0/1 makes selinux permissive or enforced

enable/disable selinux then REBOOT

A

go to /etc/sysconfig/selinux

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

Find all booleans THEN key in on a specific one.

Set a boolean for something.

Use the example in the semanage-port man page to change ports for selinux

A

getsebool -a | grep <name></name>

Refer to listed booleans and type setsebool -P <name></name>

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

Use semanage-fcontext man page to change context for files/directories

Restore the context after doing this

Go to httpd config file and change DocumentRoot’s

AFTER DOING ALL THIS RESTART HTTPD

A

-restorecon -Rv /directory

go to /etc/httpd/conf/httpd.conf and change BOTH roots to directory that was created.

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

compress with gzip
compress with bzip
compress with xzip

A

tar -czvf

tar -cjvf

tar -cJvf

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

run cronjob as different user

A

crontab -e -u username

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

Where to find ssh config file?

Make graphical sessions forward in ssh

A

use locate sshd_config

Un-hash X11 forwarding

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

To do minimal installation, go to “Software Selection”

to partition, chose “Installation Destination” > “custom” > “done”. On manual partitioning page, choose “standard” then click “+” below to add requested mount points AND capacities

-Also create a root user AND a user with sudo priv (choose “make this user administrator”

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

make it where new users get a file called newfile

xfat need -n for labels NOT -L

A

touch /etc/skel/newfile

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

paths for podman generate

root?
rootless/normie user?

A

-/etc/systemd/system/ <name></name>

  • ~/.config/systemd/user/ <name></name>

*also have to create directory for nomie, THEN use podman generate to create name of service

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

create a tuned.conf file

TAR IS FOR WHOLE DIRCETORIES NOT FILES!! NAME OF TAR MUST GO FIRST!

A

[sysctl]

vm.swappiness=##

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