CentOS 7 Users

Add a user named Bob: useradd Bob

Change Bob’s password: passwd Bob

Change your own password: passwd

Add a group named Team: groupadd Team

Add a group named Team with a Group ID of 60001: groupadd –g 60001 Team

Delete a group: groupdel Team

Delete a user: userdel user

Delete a user and their home directory: userdel –r user

Modify an existing user: usermod user [options]

Lock a user account: usermod –L user

Set maximum age of a user’s password: chage –M # user

Graphical user management tool: system-config-users

Switch to another user: su newuser

Switch to the root account: su –

Switch to the root account when we don’t know the root password but do have sudo: sudo su –

Close Menu
×
×

Cart