Modifying Users
Setting your own password
Section titled “Setting your own password”passwdSetting another user’s password
Section titled “Setting another user’s password”Run the following as root:
passwd usernameAdding a user
Section titled “Adding a user”Run the following as root:
useradd usernameRemoving a user
Section titled “Removing a user”Run the following as root:
userdel usernameRemoving a user and its home folder
Section titled “Removing a user and its home folder”Run the following as root:
userdel -r usernameListing groups the current user is in
Section titled “Listing groups the current user is in”groupsMore detailed information about user and group numerical IDs can be found with the id command.
Listing groups a user is in
Section titled “Listing groups a user is in”groups usernameMore detailed information about user and group numerical IDs can be found with id username.
Parameters
Section titled “Parameters”|Parameter|Details |---|---|---|---|---|---|---|---|---|--- |username|The name of the user. Do not use capital letters, do not use dots, do not end it in dash, it must not include colons, no special characters. Cannot start with a number.
Remarks
Section titled “Remarks”- You cannot remove a logged in user
- To modify any user but your own, you need root privileges