Domain 5 Flashcards
UID of a root user and the first standard user
0 for a root user and 1001 for a standard user
Etc/passwd
Most account features defined here consist of a colon delimited lines were each record defines a single account
etc/shadow
Passwords are stored in this file, ordinary users cannot read, salt in hashed passwords are here
Why a standard user can execute the passwd command
uses the setUID bit and a user can only modify their own password
getent passwd
Similar to cat /etc/passwd, however not identical. cat /etc/passwd only defines local user accounts, getent passwd returns both local and accounts defined on network server
etc/group
Contains collections of groups defined on computer
whoami
Returns current account
id
Returns current accounts UID, GID, groups
who -q
Will count all users currently on the Linux machine
Alternative to who
w
su
Switch user if no username is specified then root is assumed
su -c
Will run a command as root
Sudo
Run a single command as root
useradd flags
c - comment
m - create a home directory
u - specify the uid eg 1008
Which folders does useradd modify?
etc/passwd
etc/shadow
etc/group