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
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)
3
Q
/etc/shadow file
A
- Contains actual password
- Uses salted hash (on way mathematical process)
- Only readable by root
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)
5
Q
/etc/group
A
Defines collection of account called groups
6
Q
Information in an /etc/group entry
A
- Group name
- Password (maybe)
- GID (Group ID)
- User list (member accounts)
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
8
Q
newgrp groupname command
A
Changes active group
9
Q
whoami command
A
Display currently logged in user
10
Q
id command
A
- Current user
- UID
- Active GID
- Group memberships
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)
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)