Linux Flashcards
passwd fields: order required
Username
Password
User ID
Group ID
Comment
Home Dir
Login Shell
Shadow fields: order required
Username
Password
Days since passwd change
Days before may change
Days before must change
Days until passwd warn
Days after expired until account disabled
Days until account expires
Reserved
/etc/profile file
set system wide variables and startup programs for user shells
~/.bash_profile
set user specific environment variables for new login shells
~/.bashrc
maintain user-specific shell configurations
/etc/skel dir
files copied on user creation to pre-populate config files
/etc/login.def
define default account settings including home dir
useradd options
-c comment
-e expiration date yyyy-mm-dd
-m home dir
-s default shell
-u user ID
-D display default settings
adduser gives preset options for user info
usermod and options
makes changes to existing user using the same options as useradd
user add error codes: 0 1 9 12
0 success
1 Couldn’t update passwd file
9 Username is already in use
12 Couldn’t crest the home directory
user mod/del
0 success
1 Couldn’t update passwd file
2 Invalid command syntax
6 Specific user doesn’t exist
8 Cannot delete user bc user logged in
who
displays logged in users
id command
displays user and group ID and group membership
passwd options
-d delete and disable
-e expire password and force change
-l lock account
-u unlock count
chage comand and fields
displays password information
Last passwd change date
Pass Expiration
Account unactive date
Account expiration date
Minimum day between pass change
Maximum days between pass change
Days before warning of expiration