Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to create sudo user on CentOS ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 670
    Comment on it

    This blog will let you know how to create sudo users on CentOS.

    Steps to create new sudo user

    Step One: Login to your server as root user

    $ ssh root@server_ip_address

    Step Two: Use the adduser command to add new user to your system

    adduser username

    Use the passwd command to update user's password

    passwd username
    Prompt will appear now and it will ask to confirm password
    Set password prompts:
    Changing password for user username.
    New password:
    Retype new password:
    passwd: all authentication tokens updated successfully.

    Step Three: Add user to the wheel group by usermod command

    usermod -aG wheel username

    Step Four: Test sudo access on new user account

    i) Switch user by typing su command

    $ su - username
    $ sudo command_to_run
    sudo ls -la /root


    [sudo] password for username:

    If your user is in the proper group and you entered the password correctly, the command that you issued with sudo should run with root privileges.


    Thanks for reading the blog

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: