User management includes everything from creating a user to deleting a user on your system. User management can be done in three ways on a Linux system.
Graphical tools are easy and suitable for new users, as it makes sure you'll not run into any trouble.
Creating User Accounts
Command line tools includes commands like useradd, userdel, passwd, etc. These are mostly used by the server administrators. Third and very rare tool is to edit the local configuration files directly using vi. Look at the above snapshot, it has seven columns separated by a colon.
Linux User Management
Starting from the left columns denotes username, an x, user id, primary group id, a description, name of home directory and a login shell. The root user is the superuser and have all the powers for creating a user, deleting a user and can even login with the other user's account.
The root user always has userid 0.
Look at the above snapshot, we have created a user xyz along with creating a home directory -m , setting the name of home directory -d , and a description -c.
The 'xyz' received userid as and primary group id as The command useradd -D can be used to display this file. Look at the above snapshot, first we have shown the xyz user account with 'tail' command. To delete it, command "userdel -r xyz" is passed.
If You Appreciate What We Do Here On TecMint, You Should Consider:
Look at the above snapshot, user name john is replaced by the new user name jhonny. Hence, it serves as a default home directory and user profile.
By using userdel -r option, you can delete home directory along with user account. Both the command chsh and chsh -s will work to change the shell.
JavaTpoint offers too many high quality services.
Mail us on hr javatpoint. Please mail your requirement at hr javatpoint. Duration: 1 week to 2 week.
Next Topic Linux User Password. Kali Linux.
Applied Informatics Inc. Blog
Verbal A. Angular 7.
Compiler D. Software E.
How to Manage Users with Groups in Linux
Web Tech. Cyber Sec. Control S. Data Mining.
#1: Adding a new Group & User:
Javatpoint Services JavaTpoint offers too many high quality services. Syntax: useradd -D userdel To delete a user account userdel command is used.
useradd/usermod/groupadd (user management) commands in linux
Syntax: userdel -r Example: userdel -r xyz Look at the above snapshot, first we have shown the xyz user account with 'tail' command. To recheck, again 'tail' command is passed and as you can see no xyz user account is displayed.
Hence, it is deleted.
Users and Groups
Deleting Home Directories By using userdel -r option, you can delete home directory along with user account. Syntax: userdel -r Example: userdel -r john Look at the above snapshot, both home directory as well as user account john is deleted. You can change the shell mode with usermod command for a user.