Chapter 7 Flashcards

1
Q

How does Linux represent users and groups internally?

A

With numbers.

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

Where will you find the group file?

A

/etc/group

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

What file defines user accounts?

A

/etc/passwd

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

What do we call user numbers and group numbers, respectively?

A

UID User IDs and GID Group IDs.

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

What are the first 100 user and group ids and what are they for?

A

0-99, they are reserved for system use, things like accounts associated with utilities and functions

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

What is the root GID and UID>

A

0

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

What command adds users.

A

useradd (sometimes adduser)

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

How do you change user passwords?

A

passwd [username]

To change your own password omit the username.

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

Why use usermod?

A

It allows you to modify current accounts. It supports -m which moves files to the user’s new directory, also -l which changes the username if need be. Also -L and -U to lock and unlock a user’s password.

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

When you change a username, how do you help the user keep permissions?

A

chown -R sally /home/sally

This gives her permissions of all files in her home directory

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

Why use chage?

A

It allows you to modify accounts to expire if the password hasn’t been changed often enough or a specific time has expired.

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

Name a way to alter accounts without using commands.

A

Directly edit /etc/passwd (Where user info is stored) or

/etc/shadow (Where the shadow password is stored.

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

How should you remove users?

A

Change ownership or backup their files.
userdel -r [username]
-r removes their files
-f or –force forces deletion even if they are logged in.

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

How do you add a group?

A

groupadd

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

How do you hunt down stray user files after the user has been deleted?

A

Use find and their former user id.

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

How do you edit an existing groups settings?

A

groupmod

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

How do you add a user to a new group?

A

usermod G [list all groups separated by commas including old and new groups.]

18
Q

How do you hunt down stray user files after the user has been deleted?

A

Use find and their former user id.

19
Q

How do you edit an existing groups settings?

A

gpasswd

20
Q

How do you modify a group’s settings without using commands?

A

Modify the /etc/group file or

/etc/gshadow file

21
Q

How do you delete groups?

A

groupdel [groupname]

don’t forget to find and delete orphan files.

22
Q

What is syslogd and how is it configured?

A

It is the system log daemon and is configured through the /etc/syslog.conf file

23
Q

How do you manually create log entries?

A

logger with it’s options

Often used in scripts to log details of what the script does

24
Q

How do you alter log rotation?

A

edit /etc/logrotate.conf

refers to /etc/logrote.d

25
Q

How do you set the software clock?

A

date [MMDDhhmmYEAR] it assumes local

use -u for UTC

26
Q

How do you sync the hardware and software clocks?

A

hwclock and use its options

27
Q

What do you call the levels of NTP hierarchy?

A

Stratum

28
Q

How do you do a one time NPT sync

A

ntpdate [ip address of NTP server]

29
Q

What is the order of the 5 cron fields?

A

Minute, Hour, Day of Month, Month, Day of Week.

30
Q

What are the cron number rules

A

24 hour clock. separated by commas are match any. separated by - means all in the range. means wildcard, / means skip /10 means run every ten minutes

31
Q

How do you make a user cron job?

A

crontab

crontab -u makes it for another user

32
Q

Why use anacron?

A

It performs cron jobs for computers that are regularly turned off. Usually from a startup script.

33
Q

Why use at?

A

It schedules a command for one time in the future.

34
Q

Name the logging codes in order of priority.

A

From highest to lowest.

emerg, crit, warning, debug

35
Q

Summarize methods of creating and modifying user accounts?

A

Accounts can be created or modified with the help of tools designed for this purpose, such as useradd and usermod. Alternatively, you can directly edit the /etc/passwd and /etc/shadows files which hold the account information.

36
Q

Describe the function of groups in Linux

A

Linux Groups enable security features to be applied to arbitrary groups of users. Each group holds an arbitrary collection of users, and group permissions can be set on files, giving all group members the same access rights to files.

37
Q

explain the purpose of the skeleton files

A

Skeleton files provide a core set of configuration files that should be present in users’ home directories when those directories are created. They provide a starting point for users to modify their important shell and other configuration files.

38
Q

Describe how log rotation is managed?

A

Log rotation is controlled via the /etc/logro-tate.conf file(which typically refers to files in the /etc/logrotate.d/) Entries in these files tell the system whether to rotate logs at fixed intervals or when they reach particular sizes. When a log rotates, its renamed (and possibly compressed) a new log file is created and the oldest archived log files may be deleted.

39
Q

Summarize how to review journal data?

A

The systemd-journald service is responsible for journal message data. The daemon is controlled via the /etc/systemd/journal.conf config file. This journal message data can only be viewed using the journal journalctl utility. To View systems journal data, you must either use superuser privileges or be a member of the systemd-journal group. Users can view their own user journal data files. To View the entire current file, simply use the journalctl command with no parameter. to parse out journal data, use the various filters available with the journalctl utility via parametrs

40
Q

explain the two types of clocks in x86 and x86-64 hardware?

A

The hardware clocks keeps time when the computer is powered down, but most programs don’t use it while the computer is running.Such programs refer to the software clock, which is set from the hardware clock when the computer boots.

41
Q

Network Time Protocol

A

is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks. In operation since before 1985, NTP is one of the oldest Internet protocols in current use.

42
Q

Describe how to configure anacron jobs?

A

anacron jobs are controlled from the /etc/anacron tab file. The file is checked to see when each listed job was last executed, and it ensures that the designated time period between executions is followed. Time periods are listed in number of days. No time period can be less than one day and therefore jobs needing to be run more than one time per day should not use anacron. Often anacron itself is run from a system start script from a cron job.