![]() ![]() #3) With great power comes great responsibility. It usually boils down to these three things: ![]() We trust you have received the usual lecture from the local SystemĪdministrator. In a session, first-time use of “sudo”, you will get a screen to enter the user password: Output. To use the sudo privileges with any command is very simple, prefix the command with “sudo” and space as shown below: $ sudo ls -l /root If the user having sudo access, you will get the output of the “whoami” command is “root”: Output. Now, run “whoami” command with sudo: $ sudo whoami To this either you login using your username and password or switch to your account using “su” command, as shown below: $ su - username To check you have sudo access or not, first go to your account login. To add a user into the “wheel” group, use the following usermod command: $ usermod -aG wheel username Test the sudo access ![]() In the RHEL system if you get a member of the wheel group you will get the sudo access. Passwd: all authentication tokens updated successfully. You will get the new screen to set new password for given username, like below: Changing password for user user_name. You should run the “passwd” command to secure user with password, as show below: $ passwd user_name Please replace the “user_name” with the user name that you want to create: $ adduser user_name Step 3: Set password for Username Now, we will create a new user in this RHEL machine by using ‘adduser” command. In the first step, you need to login into your system or server with root user, using the SSH command: $ ssh Step 2: Create a new user account If you want to give sudo privileges to an existing user, just need to add in “wheel” group and for that directly go to step 4. We will create a new user in RHEL machine with sudo privileges in simple four steps. So, you can use this user to execute an administrative command in the system without login as root user in your RHEL machine. In this tutorial, we will learn how to create a new user with sudo access on Red Hat Operating System. The “sudo” command allows users to run any other commands, services, or program with the privileges of another user, and by default, it took the privileges of the root user. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |