User Accounts and Groups Flashcards

1
Q

/etc/passwd

A
  • Most account features are defined
  • Contains a list of comma-delineated lines
  • Each line has a record defining a single user account
  • Must be readable by all users
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Information in an /etc/passwd entry

A
  • Username/Password
    *UID (user identification, machine readable Username)
  • GID (Group ID)
  • Comment field
  • Home directory
  • Default shell (/bin/bash)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

/etc/shadow file

A
  • Contains actual password
  • Uses salted hash (on way mathematical process)
  • Only readable by root
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Information in /etc/shadow file entry

A
  • Username (no UID)
  • Password as slated hash
    • or ! denotes an account is locked
  • Last password change (stored as a number of days since 1/1/1970)
  • Days until a change is allowed
  • Days until a change is required
  • Days of warning before password expiration
  • Days between expiration and deactivation
  • Expiration date (stored as a number of days since 1/1/1970)
  • Special flag (reserved for future use)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

/etc/group

A

Defines collection of account called groups

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

Information in an /etc/group entry

A
  • Group name
  • Password (maybe)
  • GID (Group ID)
  • User list (member accounts)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Ways to define a users group membership

A
  • Specifying the GID in users /etc/passwd entry (only one group can be assigned this way. Default group)
  • Specifying usernames in the user list of the /etc/group file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

newgrp groupname command

A

Changes active group

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

whoami command

A

Display currently logged in user

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

id command

A
  • Current user
  • UID
  • Active GID
  • Group memberships
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

who command

A
  • Username
  • Terminal identifier (0 means local login)
  • PTS or TTY
  • Login date and time (when person logged in)
  • Remote host (login source)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

w program

A
  • More verbose version of who
  • Idle time
  • JCPU (total amount of CPU time associated with that session)
  • PCPU (amount of CPU time of the processes running inside that session)
  • WHAT (what session is running and doing)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly