CS199_Week_3 Flashcards

1
Q

At a low level, users are represented by an integer called…?

A

a User ID (uid).

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

Every process that runs on the system runs a …?

A

given uid.

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

Every file in the file system is owned by a …?

A

uid

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

The /etc/passwd file maps uids to…?

A

user accounts.

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

User accounts map uids to a…?

A

username, password, Group Id(s), a home directory, and a login shell.

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

Passwords are changed with…?

A

passwd command.

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

Passwords now store in…?

A

/etc/shadow

safer to do this, only user root can view file, change password using passwd

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

Three types of users…?

A

Normal, root and system.

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

Normal users…?

A
  • Real people
  • Login shell is /bin/bash
  • Home directory inside /home
  • UID over 500
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The root User…?

A
  • UID 0

- Free rein on system: she may modify or remove any file; she may run any command; she may kill any process.

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

System users…?

A
  • Components of system, not real people
  • UID in range 1 -499
  • Example : Processes that handle email often run as the username mail
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Fundamentally, a group is just…?

A

an integer group id (gid)

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

Every process that runs on the system runs…?

A

under a collection of groups (gids)

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

The /etc/group file maps gids to…?

A

group names and group memberships

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

Every file in the file system is owned by …?

A

a single gid

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

Users have a single primary group defined in…?

A

the /etc/passwd file.

17
Q

Users may be members of multiple secondary groups, defined in the…?

A

/etc/groups file.

18
Q

Every file must have a group owner, there must be a…?

A

default group associated with each user.
(This default group becomes the group owner of newly created files. This group is known as a user’s primary group. A user’s primary group is defined in the fourth field of a user’s /etc/passwd entry.)

19
Q

In addition to a primary group, users may optionally belong to…?

A

other groups as well.

These groups are termed secondary groups, and are defined (coincidentally) in the fourth field of the /etc/group file.

20
Q

Use usermod and groupmod commands to…?

A

modify group membership.

21
Q

The id command displays..?

A

user and group information.

22
Q

The whoami command reports…?

A

the current username

23
Q

The who, users, and w commands…?

A

report users with active sessions.

24
Q

The finger command reports when users were last…?

A

logged onto the system, and other user information. (A .plain file can be placed in the user’s home directory with more information)

25
Q

The su command allows a user to…?

A

switch user id

26
Q

The su command is usually called with a ..?

A

hyphen, such as su -, to specify that the user should effectively log in as the new user.

27
Q

The newgrp command, also called sg, allows a user to…?

A

switch primary group id.