Lesson 5 Flashcards
How are users and groups indentified?
UIDs and GIDs
What is the length of modern UIDs?
64 bits
Every user has a UID and a GID
True
What is the UID of root?
0
What unique characteristics do user account shave?
UID starting with 1000
A defined home directory
A defined login shell
Name attributes of system accounts?
UID under 100 or 500-999
No home directory
No shell defined
What is the primary difference between system and service accounts?
Not a huge difference but their UID/GID/s will be different, service account >1000
What is the command to change the shell?
chsh
What does the id command do?
Lists basic information about the current shell user
what do the “who” and “w” commands do?
they list active logins to the system
What’s the biggest issue with using su to switch to root?
If a regular user’s session is compromised, the root password could be captured
Name the main configuration file locations for user accounts and access controls
/etc/passwd
/etc/group
/etc/shadow (passwords)
/etc/gshadow
what does the /etc/sudoers file contain?
users who can use the sudo command
What is the /etc/passwd file?
commonly referred to as the “password file”. each line contains multiple fields always delimited by a colon
What is the GECOS field?
contains three or more fields delimited by a comma, normally NAME, LOCATION,CONTACT
What does the chfn command do?
Changes information int he GECOS field
what does /etc/group store?
colon delimited information about groups
NAME:PASSWORD:GID:MEMBERS
In which files are UID and GID stored?
/etc/passwd
In which file are Groups stored?
/etc/group
In which file are passwords stored?
/etc/shadow
How are passwords stored?
With a one way hash
Which command to get all active logins on the system?
W command
command to add a user?
useradd username
command to set a users password?
passwd username
which command to list a users information?
id username
lists the groups that a user is part of
groups username
how do delete a user?
userdel -r username
what is the /etc/skel directory?
contains the skeleton structure files and directories to create for a users home directory when created
how to add a new group
groupadd groupname