Ch.4 Managing Linux Users and Groups Flashcards
/etc/passwd is an example of what database?
flat-file database
changes a users last change date
chage -d YYYY-MM-DD
changes the current users UID, primary group ID and home directory as well as reads the new users profile which allows you to become exactly like the new user
su - <user></user>
changes the current users UID, primary group ID, and home directory
su <user></user>
chang a users ID or group command
usermod
contains a list of groups and their members
/etc/group
contains user account information
/etc/passwd
difference between a user and system accounts
System accounts cannot log on to the system, do not require a password, and do not have home directories
Displays password aging information
passwd -S
or
chage -l <user></user>
format for a record in the /etc/passwd file
user_name:password:UID:GID:comment:home_directory:default_shell
how are user account ID ranges specified?
by variables UID_MIN and UID_MAX in /etc/login.defs
How can you tell a user is disabled in /etc/shadow?
user account has * in the password field
how to change a users aging info with a user interface
chage <user></user>
How to create a skeleton directory for users with similar needs?
- Create a directory named /etc/skel_<group_name>/</group_name>
- copy all files in /etc/skel/ to that directory, edit the appropriate config files, and add any additional files desired into the new directory.
- adding users to that group use the option -k
useradd -k /etc/skel_<groupname> <username></username></groupname>
information for users and groups are stored where?
/etc/passwd
/etc/shadow
/etc/group
Linux method to permit or restrict access to files
discreationary access control (DAC)
Linux supports a more granular permission structure called? What are these rights controlled by?
Mandatory Access Control (MAC)
Controlled by SElinux or AppArmor
removes all of the users secondary groups and replaces them with a new secondary group
usermod -G <groupname></groupname>
sets the account expiration date
chage -E YYYY-MM-DD
sets the default number of days after a password expires for the account to become inactive
useradd -Df <number></number>
sets the minimum number of days required before a password can be changed
passwd -n
sets the number of days prior to password expiration, when the user will be warned of pending expiration
chage -W
The user account ID for a service is in the range
0-99 or between the values set by SYS_UID_MIN and SYS_UID_MAX in /etc/login.defs
useradd command obtains default values initially from ____ and next from ____
initially form /etc/login.defs and next from /etc/default/useradd