How to Create New User In CentOS?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/create-new-user-centos/
PINTEREST
PINTEREST
INSTAGRAM

CentOS is enterprise level Linux distribution which is clone of the RedHat. User management like create, add, remove etc is important part of the daily Administration tasks. In this tutorial we will look how to add new user to the CentOS system.

List Current Users

Before creating new user we will list existing users. We can use different methods to list existing users but following is the most practical way to list existing users. We will cat user names with the cut command.

List Current Users

List Current Users

Add New User with useradd

Now we can add our new user. We have all ready checked the existing users but if we try to add existing user we will files. We will use useradd command by providing the user name. In this example the user name will be poftut .

Add User To The Sudoers

Newly added user will have its own group and will not added to the other groups. Sudoers is a special mechanism which group name is wheel . Sudoers can run commands with administrator or root privileges. We can add newly created user to the Sudoers with usermod command. We will add user poftut to the wheel group which is Sudoers group.

List Wheel Group or Sudoers Users

We can list current wheel group user members with the following command.

List Wheel Group or Sudoers Users

List Wheel Group or Sudoers Users

Change Shell To New User

We can practically change shell to the newly created user with the su command. In this example we will change to the user poftut like below.

LEARN MORE  Linux stat Command Tutorial With Examples

Change Shell To New User

Change Shell To New User

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/create-new-user-centos/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)