linux-mascot

SOP – Adding a New User with Sudo Permissions in Linux

SOP for Adding a New User with Sudo Permissions

Objective:

The objective of this SOP is to provide a standardized procedure for adding a new user to a Linux server with sudo permissions.

Pre-requisites:

  1. Access to the Linux server with administrative privileges.
  2. Basic knowledge of Linux command line interface.

Procedure:

  1. Connect to the Linux Server:

    Open a terminal window or SSH client to connect to the Linux server.

  2. Switch to Root User (Optional):

    If not already logged in as root, switch to the root user by executing:

    sudo su -
  3. Add New User:

    Add a new user using the adduser command. Replace <username> with the desired username:

    adduser <username>

    Follow the prompts to set a password and fill in optional user information.

  4. Grant Sudo Permissions:

    Add the newly created user to the sudo group to grant sudo permissions:

    usermod -aG sudo <username>
  5. Verify Sudo Access:

    Switch to the newly created user to verify sudo access:

    su - <username>

    Test sudo permissions by executing a command with sudo:

    sudo whoami

    Enter the user password when prompted.

  6. Test SSH Access (if applicable):

    If the user requires SSH access, test SSH login with the new user credentials:

    ssh <username>@<server_ip>

    Verify successful login.

  7. Update Security Policies (Optional):

    If required by organizational policies, update sudoers file to customize sudo permissions:

    sudo vi sudo

    Add or modify sudo rules as necessary, following the syntax and guidelines provided in the sudoers file.

  8. Document User Credentials:

    Document the newly created user’s credentials, including username, password (if applicable), and sudo privileges for future reference.

  9. Notify Relevant Parties (Optional):

    Notify relevant team members or stakeholders about the creation of the new user for awareness and access management purposes.

Completion:

Once the new user has been successfully added with sudo permissions and tested for access, the SOP is considered complete.

Notes:

  • Ensure that the new user’s password follows the organization’s password policy for security purposes.
  • Regularly review and update sudo permissions and user accounts as per security requirements and personnel changes.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *