Manage users and groups Flashcards Preview

RHCSAv8.2 > Manage users and groups > Flashcards

Flashcards in Manage users and groups Deck (13)
Loading flashcards...
1

how to create an account called user with UID of 1005

useradd -u 1005 user

2

how to add the account user to admin group

usermod -aG admin user

3

how to lock the user account

usermod -L user

4

how to unlock the user account

usermod -U user

5

how to set the maximum age of user's password to 90 days

chage -M 90 user

6

how to check the maximum age of user's password

chage -l user

7

how to force password change on first login for user

chage -d 0 user

8

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

9

how to delete the account user

userdel user

10

how to change user's password

passwd user

11

how to create a group with GID of 3000 called operators

groupadd -g 30000 operators

12

how to delete a group called operators

groupdel operators

13

how to give a user sudo access

visudo
vim /etc/sudoers