linux_shortcuts Flashcards
CHFI certificate
/etc/default/useradd
file contains default values used by the useradd utility when creating a user account, including:
/etc/group
The file that contains group definitions and memberships. same as active directory
/etc/login.defs
contains: Values used for the group and user ID numbers
/etc/passwd
contains the user account information
/etc/shadow
The file that contains the encrypted password as well as password and account expiry parameters for each user account.
/etc/skel
directory contains a set of configuration file templates that are copied into a new user’s home directory when it is created, including the following files:
passwd -d
removes the password from an account.
passwd -l username
Lock users out with this command
passwd -n
sets the minimum number of days a password exists before it can be changed.
passwd -S username
displays the status of the user account.
passwd -t
sets the number of days following the password expiration that the account will be disabled.
passwd -u
enables (unlocks) an account.
passwd -w
sets the number of days before the password expires that the user is warned.
passwd -x
sets the number of days before a user must change the password (password expiration time).
useradd - r
specifies that the user account is a system user
useradd -c
adds a description for the account in the GECOS field of /etc/passwd.
useradd -d
Specifies the path of the user’s home directory
useradd -D
displays the default values specified in the /etc/default/useradd file
useradd -e
specifies the date on which the user account will be disabled
useradd -f {numdays}
pecifies the number of days after a password expires until the account is permanently disabled
useradd -g group
defines the primary group membership
useradd -L
locks the user account
useradd -m username
creates the user’s home directory (if it does not exist).
useradd -M
defines the secondary group membership
useradd -n
does not create a group with the same name as the user (Red Hat and Fedora, respectively).
useradd -p
defines the encrypted password
useradd -s
defines the default shell.
useradd -u
assigns the user a custom UID. This is useful when assigning ownership of files and directories to a different user.
userdel -f username
forces the removal of the user account even when the user is logged into the system.
userdel -r username
removes the user’s home directory.
userdel [username]
deletes a user
usermod -c
changes the description for the account
usermod -l
renames a user account.
usermod -U
unlocks the user account.
usermod
Modify user account