Managing Users and Groups Flashcards
/etc/passwd file contents
Stores User account information
/etc/shadow file contents
Hashed passwords, password requirements and expiration information
chage command
change age command, used to control password, expiration, expiration warnings, inactive days, and other information for existing accounts
Usermod -aG command
Adds user to a group and keeps them in their existing groups
usermod -l
changes the user’s login name
usermod -c
sets the comment field
List two commands to lock a user
passwd -l {user name}
Usermod -L {user name}
List two commands to unlock a user
passwd -u {user name}
Usermod -L {user name}
/etc/group file contents
storage and information location about all the groups on a system
Groupadd command
creates a group
Groupmod command
Used to change the group’s own attributes
Groupdel command
Delete groups from the /etc/group file
Groupmod -g command
change the group ID
Groupmod -n command
rename a group
whoami command
Used to display the user name with which you are logged in to the system
who command
Used to determine the details of users currently logged in to a system
W command
primarily used to display the details of users who are currently logged in to a system
Last command
Displays the history of user login and logout actions, along with the actual time and date
ID command
Used to display user ID and group ID information
.bashrc file
enables customization of the user’s own environment
.bash_profile
Provides shell configuration for the initial login environment
/etc/skel
Contents of this file are copied into the home directories of new users
/etc/profile
Provides system-wide environment variables
run only at login
.profile
user-specific bash customizations are pulled from the .profile file
/etc/profile.d/
storage locations for scripts
sudoedit command
Permits a user to edit a file with their own credentials, even if the file is only available to the root user
Must make an entry in the sudoers file to use
visudo command
when using, the system verifies the syntax of the /etc/sudoers file before committing changes
enabling the administrator an opportunity to correct mistakes before they become part of the configuration
The Wheel Group
Members of this group exercise the adminsitrative privileges of root with less potential for damaging the system
visudo to edit privileges
useradd command
used to create user accounts and configure basic settings
stored in the /etc/passwd
configured according to various options set in /etc/login.defs
useradd -c
sets the comment field, which is typically used as the field for the user’s full name
useradd -e
sets the account expiration date
useradd -s
sets the user’s default shell
useradd -D
view the default configuration for new users