ch 2 Flashcards
/etc/passwd
stores the actual user account and maintains various settings related to accounts.
/etc/shadow
stores password information for the accounts. Only available to root user.
Why would some user use different shells?
If a user has more experience with another shell they might prefer to use that shell over bash (the most common shell).
/etc/profile
to set system-wide environment variables and startup programs for new user shells.
/etc/bashrc
to establish system-wide functions and aliases for new user shells.
/etc/skel
A sysadmin can store files in this directory and have those files automatically copy to the home directory of any new user.
useradd
The command that creates a user
usermod
The command that modifies existing users
userdel <user></user>
The command that deletes a user
useradd -c
set the comment value
syntax for useradd command
useradd -options argument (ex- useradd -c “Kai Garcia”)
passwd command
sets a password for a user (ex passwd [username])
adduser command
Some Linux distributions use the adduser command instead of useradd.
Some systems recognize both. The adduser command prompts administrators for details, including home directory locations and full names. Perhaps most importantly, adduser prompts sysadmins to set a user password. The adduser command can be added to a Linux system.
Why are user passwords stored in the /etc/shadow file and not the
/etc/passwd file?
The /etc/passwd file can be read by all processes and therefore isn’t as secure. The /etc/shadow file
can only be read by root.
What is the purpose of the /etc/skel directory?
Any files stored in this directory are automatically copied to the home directory of new user accounts. Profile files and other configurations can be easily set using /etc/skel.
Why might an administrator change a user’s default shell?
The user may be more comfortable with a different shell than Bash, such as the Zsh or Ksh.