User management in Linux involves creating, modifying, and deleting user accounts, as well as managing user permissions and groups.
| # useradd | Will create user without home directory |
| # adduser | will create user with home directory |
| # passwd username | will set password for specific user & change password also |
| # userdel username | will delete the username without home directory |
| # userdel -r username | will delete the username with home directory |
| # cat /etc/passwd | to show all the user details |
| # usermod -ag groupname username | to add a user to a group |
| # su – username | command is used to switch to another user account |
| # groups username | command is used to display the groups a user belongs to |
| # ls /home | will show all the users home directory |
| #sudo -s | to change root account |
Leave a comment