What's new
Your Hosting Talk

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

How to create user and group in CentOS 7

Well in this writeup we are going to show you a quick way to create a user and how to add a group in CentOS 7

First let us have a look at adding a new user in CentOS 7​

1. Log in to your server as the root user

ssh root@server_ip_address

2. Use the adduser command to adduser command to add a new user to your system.

Note: Be sure to replace the Username

3. Use the passwd command to update the new user’s password

Passwd username

Now set and confirm the new user and password at the prompt. Always a strong password is highly recommendable.

Creating a User Group​

1. To create a Group, you need to use a groupadd command.

Now add a user to the group

Adding a user to Group​

1. Use the usermod command to add the user to the wheel group.

usermod -a -G wheel username

2. Now to add users to multiple groups, use the command given below.

usermod -a -G group1,group2,group3 example username

So these was the basic commands you have to follow to create and to add the user in the group in Centos 7

Hope this was helpful!!!
 
Top