Create sudo user in CentOS
How to create a user in CentOS and give sudo access To create a user in CentOS follow these steps
-
You must be logged in as root to add a new user
-
Issue the useradd command to create a locked account
-
Issue the passwd command to set the password of the newly created user
This will you prompt you to enter the password of the newly created user
- To give the user sudo access you need to add the user to wheel group
To do this issue the command : visudo
To be able to add a user to the wheel group you must uncomment the line ie
to-
Adding the newly created user to wheel group
-
Finished - Your user now has sudo access !! enjoy !!
Last update:
November 7, 2023