1 / 4

Your Practical Guide to Creating Users and Groups in Centos 07

Let this practical guide help you create users and groups & add them to groups in CentOS7 with ease.

Joellee1
Download Presentation

Your Practical Guide to Creating Users and Groups in Centos 07

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Your Practical Guide to Creating Users and Groups in CentOS7 Linux, an operating system that has been around for quite some time, still amazes many users. Despite having a few similarities in capabilities, strength, and robustness with popular Operating Systems, Linux has carved a niche for itself. You may be well acquainted with managing the basic tasks, but some avenues require you to be absolutely sure before you perform them. Dealing with CentOS is one of them. A brief about CentOS: CentOS, by nature, is a free and popular operating system. Besides being community-driven, CentOS is an open-source Linux Distribution having its roots in the Red Hat Enterprise Linux source code. Built fundamentally on the core Linux kernel, CentOS is a highly stable Operating System offering enormous security and has developed a niche class of users for itself. Note: Before beginning your journey, you must either log in as a “Root User” or a “non-root sudo-enabled user.” For ease of explanation, we have used the Root User. Sudo means "substitute user do" or "super user do." If you log in using a sudo-enabled user, you must add the word “sudo” at the beginning of each command. Also Read: How To Install CentOS Web Panel In CentOS

  2. Add or Create a User in CentOS: a. Log in as a root user to your server Command: ssh root@server_ip_address b. For adding a new user, type the command adduser in the system. Caution: Username indicates the user that you want to add. Hence, ensure to modify the username with the user of your choice. Command: adduser username c. Password is the required command to create a password for this new user. Command: passwd username Important: At the prompt, please create and reconfirm the password for the new user. A strong and complex alphanumeric password is recommended to secure the user’s account. Also Read: How To upload website Files and Database Using cPanel Create a Group in CentOS: Creating a group in CentOS is a straightforward process. You must use the Groupadd command followed by the New Group’s Name. Please check the following. Command: groupadd THE-NEW-GROUP-NAME

  3. For sudo enable-user, use the following: Command: sudo groupadd THE-NEW-GROUP-NAME Also Read: Reduce CSF load with CWP Add User to the Group in CentOS: Before understanding how to add a user to the group, it is substantial to know what is a “Wheel Group” or a “Wheel User Group?” Wheel Group is a special group in a Linux distro whose members/users have root (administrative) privileges to perform tasks similar to root admins. Wheel Group: To add a username to the Wheel Group, you must type in the following command. Command: usermod -a -G wheel username Multiple Groups: If you wish to add a username to multiple groups, the following command is for you. Command: usermod -a -G group1,group2,group3 username Caution: Ensure to replace the word username with the actual user’s name.

  4. Also Read: What is FTP & How to Create an FTP Account In cPanel? Testing sudo access on a newly created user account in CentOS: Before achieving this task, you must first switch to the newly created user account. Use the following command. Command: su - username Now that you have switched to the newly created user account, verifying whether sudo works with this user is mandatory. Decide upon a command that you wish to execute with superuser privileges. Simply write “sudo” at the beginning of that command to see if it performs as expected. Only the root user has access to the content list of the /root directory. You can run the following command from this newly created user. Command: sudo ls -la /root Caution: If you are using sudo for the 1st time (in this session), the system will prompt you to enter the correct password for this new user. Please type in the correct password to proceed with the task. Source https://www.hostitsmart.com/manage/knowledgebase/236/Your- Practical-Guide-to-Creating--Users-and-Groups-in-CentOS7.html

More Related