Workbook 3 Flashcards

1
Q

What is the name of the file in which UID’s are found?

A

/etc/passwd [3/4]

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

Which fields in /etc/passwd identify a user’s (i) home directory, (ii) login shell?

A

Home Directory: Field 6.

Login Shell: Field 7. [3/5]

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

In which file are user passwords stored?

A

/etc/shadow [3/5]

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

What is a system user?

A

Users for components of the system.
For example, the processes that handle email often run as the username
mail. [3/6]

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

What is the uid of the root user?

A
  1. [3/6]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the uid range of (i) system users and (ii) normal users?

A

System Users: 1-499.

Normal Users: 500+ [3/7]

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

What is the name of the file in which GID’s are found?

A

/etc/group [3/12]

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

Which fields in /etc/group identify a group’s (i) name and (ii) members?

A

Group Name: 1

Group Members: 4. [3/13]

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

What is a user’s primary group and where can you find that piece of data?

A

The default group that is associated with the user. By default it is the users username. It can be found in /etc/passwd [3/13]

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

What is a user’s secondary group(s) and where can you find that piece of data?

A

Any other groups that multiple users can be a part of. This is found in /etc/group [3/13]

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

What commands are used to change group memberships?

A

usermod and groupmod. This can only be done by root. [3/14]

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

What does the id command output?

A

User and Group information. [3/20]

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

What commands can be used to determine who is logged in?

A

who, users, and w. [3/20]

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

You are currently logged in as user prince. Give a command line to temporarily switch your identity to the root user.

A

su - [3/28]

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

What is the difference between (i) su and (ii) su – ?

A

login shells. [3/28]

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

What character is used in the command line prompt to indicate that the shell is being run as (i) the root user and (ii) an ordinary user?

A

Normal users: $

Root user: # [3/28]

17
Q

Why would an ordinary user use the newgrp command?

A

To switch the users primary group to a secondary group temporarily. [3/28]