Lesson 7 Quiz Flashcards

1
Q

The SysVinit is driven by initialization scripts located here.

a) /etc/boot/rc.d
b) /etc/rc.d
c) /boot/rc.d
d) /var/rc.d

A

b) /etc/rc.d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
Runlevels define a grouping for daemons/services. Match the runlevel number to the definition used on CentOS / RHEL. 
a) 5  b) 3  c)  1  d) 0
Multiuser with Graphics              
Multiuser but no graphics         
Single User Mode
Poweroff
A

Multiuser with Graphics a)5
Multiuser but no graphics b)3
Single User Mode c)1
Poweroff d)0

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

What is the UID (user ID) of the root user?

a) 999
b) 0
c) 10
d) 100

A

b) 0

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

You want to check the status of sshd, to see if it is currently running. What command do you use?

a) service sshd status
b) runlevel sshd
c) chkconfig sshd
d) status sshd

A

a) service sshd status

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

You type the runlevel command and see the following output

$ runlevel
N 5

What does the output mean?	
a)  N = New Run Level
5 = The New Run Level
b)  N = New Updates
5 = Update Every 5 seconds		
c)  N = No status available
5 = Repeat command in 5 seconds
d)  N = No previous runlevel
5 = The current run level
A

d) N = No previous runlevel

5 = The current run level

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

Select ALL the ways you can run a command as a root user.

a) Login as root and then run the command as root.
b) Run the command using the su command.
c) Run the command with setuid (set user ID) set to the root user.
d) Run the command using the sudo command. (Assuming the sudoers file has been configured.)

A

a) Login as root and then run the command as root.
b) Run the command using the su command.
c) Run the command with setuid (set user ID) set to the root user.
d) Run the command using the sudo command. (Assuming the sudoers file has been configured.)

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

This is the key directory for log files.

a) /ect/messages
b) /etc/log
c) /var/log
d) /var/messages

A

c) /var/log

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

You are using a Linux system and you see some documentation that talks about PAM. What is PAM?

a) Pluggable Authentication Module
b) Powerful Admin Mode
c) Powerful Access Mode
d) Pluggable Access Menu

A

a) Pluggable Authentication Module

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

Use this command to display messages from the kernel ring buffer.

a) dmesg
b) /var/log/messages
c) runlevel
d) ring-buffer

A

a) dmesg

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

On CentOS, RHEL, and Fedora, the graphical configuration tools begin with this.

a) system-config-
b) service-
c) gedit-config-
d) chkconfig-

A

a) system-config-

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

Your BASH terminal is “messed up” and displaying strange characters. Enter the EXACT command you can type ot get your BASH screen back to it’s normal state.

A

reset

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

Releated to Linux security, select ALL that are TRUE.

a) MAC = Mandatory Access Control
b) Adding SELinux provides MAC.
c) Adding SELinux provides DAC.
d) SELinux is a popular Linux Distro with features simliar to CentOS / RHEL.

A

a) MAC = Mandatory Access Control

b) Adding SELinux provides MAC.

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

Suppose you are troubleshooting an issue and you could only look at a single log file. What is the most important log file you could look at?

a) /boot/messsages
b) /etc/log/messages
c) /var/log/messages
d) /var/boot/messages

A

c) /var/log/messages

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

Use this command to see if SELinux enabled on your system.

a) sestatus
b) service selinux status
c) chkconfig selinux
d) runlevel selinux

A

a) sestatus

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

You want to configure sshd so that it never turns on, regardless of the runlevel. What command do you use?

a) runlevel sshd off
b) chkconfig sshd off
c) service sshd off
d) shutdown sshd

A

b) chkconfig sshd off

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

This is called the “substitute user” command.

a) subdo
b) setuid
c) su
d) subuser

A

c) su

17
Q

When using systemd, you can use this command to display info about systemd status.

a) systemd
b) systemd-status
c) systemctl
d) runlevel

A

c) systemctl

18
Q

The following statements are TRUE related to the Linux init daemon.

a) You can stop and restart the init daemon at any time.
b) The init daemon has PID (process ID) of 0
c) The init daemon is the system and service manager for GNU/Linux.
d) The init daemon has PID (process ID) of 1

A

c) The init daemon is the system and service manager for GNU/Linux.
d) The init daemon has PID (process ID) of 1

19
Q

Today there are many options for init beyond the original SysVinit. Select ALL the items below that are replacements for SysVinit.

a) PAM
b) Upstart
c) systemd
d) visudo

A

b) Upstart

c) systemd

20
Q

You want to send a signal to a process. Enter the EXACT command you would enter. (Enter only the command, no command parameters.)

A

kill

21
Q

Use this command to change runlevels.

a) change-runlevel
b) telinit
c) runlevel
d) service

A

b) telinit

22
Q

Select ALL statements below that are TRUE related to Linux security.

a) DAC = Discretionary Access Control
b) By default, Linux security is DAC.
c) Adding SELinux provides DAC.
d) PAM = Power Admin Mode

A

a) DAC = Discretionary Access Control

b) By default, Linux security is DAC.

23
Q

You are using BASH and you need to clear your screen. Enter the EXACT command you would type to clear the screen.

A

clear

24
Q

This is the BEST command to use to edit the /etc/sudoers file.

a) visudo
b) vim
c) gedit
d) vi

A

a) visudo

25
Q

You need to boot into single user mode, so you stop the boot loader, and then enter the following at the end of the boot command line. Select ALL the options below that you can enter at the end of the boot command line to boot into single-user mode.

a) 1
b) 3
c) single
d) 0

A

a) 1

c) single