HOW TO CREATE USER IN LINUX USING CLI
GAURAV CHAUDHARY
Senior DevOps Engineer | OpenShift Virtualization |Kubernetes |GitOps | RHCSA| RHCE| RHCVA |Docker| Jira |AWS S3 | Jenkins | Suse Linux Enterprise Server | RedHat Enterprise Linux| Ansible | Nagios | Openstack | Puppet
In Linux Users are mapped to User-ID or UIDs. For Super User root UID is 0 . If we create User in our Linux box UID of these users start from UID 1000 and these known as unprivileged users or non-root user or normal Users. To create these users in Linux from CLI we need to use useradd command .
So first login with super user root or you can use sudo if you have sudo privilege .
~#useradd <username> ## this is the syntax of useradd command wherein in place of <username> you have to give name of the user you want to create.
For example I want to create a user with name testuser so the command would be :-
~# useradd testuser
So the above command will create a user with name testuser and UID of this user would be next free UID above 1000.
So this is just a very basic idea on User creation in Linux from CLI.