SlideShare a Scribd company logo
1 of 4
Download to read offline
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
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
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.
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 Content

Similar to Your Practical Guide to Creating Users and Groups in Centos 07 .pdf

Similar to Your Practical Guide to Creating Users and Groups in Centos 07 .pdf (20)

Basic Guide to make your Linux server ready
Basic Guide to make your Linux server readyBasic Guide to make your Linux server ready
Basic Guide to make your Linux server ready
 
User Management Command Cheat Sheet.pdf
User Management Command Cheat Sheet.pdfUser Management Command Cheat Sheet.pdf
User Management Command Cheat Sheet.pdf
 
Cent os 5 ssh
Cent os 5 sshCent os 5 ssh
Cent os 5 ssh
 
linux installation.pdf
linux installation.pdflinux installation.pdf
linux installation.pdf
 
Linux
Linux Linux
Linux
 
Unix Administration 3
Unix Administration 3Unix Administration 3
Unix Administration 3
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bits
 
Clustering manual
Clustering manualClustering manual
Clustering manual
 
User management
User managementUser management
User management
 
Topic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptxTopic 3-1_More_Linux_Commands.pptx
Topic 3-1_More_Linux_Commands.pptx
 
55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines
 
Linux
LinuxLinux
Linux
 
A Complete Guide to “useradd” Command in Linux with Examples _ Hostbillo
A Complete Guide to “useradd” Command in Linux with Examples _ HostbilloA Complete Guide to “useradd” Command in Linux with Examples _ Hostbillo
A Complete Guide to “useradd” Command in Linux with Examples _ Hostbillo
 
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
Project
ProjectProject
Project
 
Linux host review
Linux host reviewLinux host review
Linux host review
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 

Recently uploaded

FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
dollysharma2066
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
lizamodels9
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Sheetaleventcompany
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
dlhescort
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
Matteo Carbone
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
daisycvs
 

Recently uploaded (20)

Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 
Falcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in indiaFalcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in india
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 

Your Practical Guide to Creating Users and Groups in Centos 07 .pdf

  • 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