Manage users and groups Flashcards
how to create an account called user with UID of 1005
useradd -u 1005 user
how to add the account user to admin group
usermod -aG admin user
how to lock the user account
usermod -L user
how to unlock the user account
usermod -U user
how to set the maximum age of user’s password to 90 days
chage -M 90 user
how to check the maximum age of user’s password
chage -l user
how to force password change on first login for user
chage -d 0 user
how to set specific date user’s password will expire
chage -E 2019-07-24 user
run date -d “+180 days” +%F if you want to get 180 days from today in this format
how to delete the account user
userdel user
how to change user’s password
passwd user
how to create a group with GID of 3000 called operators
groupadd -g 30000 operators
how to delete a group called operators
groupdel operators
how to give a user sudo access
visudo
vim /etc/sudoers