Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Connect to your server through PuTTY. If you don’t already have PuTTY installed, please follow the link SSH to Instance using Windows.

  2. Create new user, for example newuser, and give the user a password with the following commands:

    Code Block
    sudo adduser newuser
    sudo passwd newuser
  3. To give the user sudo permissions, add the user to the group wheel, which gives sudo access to all members.

    Code Block
    sudo gpasswd -a newuserwheelnewuser wheel
  4. The function lid shows which groups a user belongs to. Using function lid with -g flag will show which users belong in the indicated group.
    The following will show the usernames of those in the group wheel.

    Code Block
    sudo lid -g wheel
  5. To remove sudo permission, remove user from group wheel.

    Code Block
    sudo gpasswd -d newuser wheel
  6. If there is a user account no longer needed, run the following to delete the user without deleting their files:

    Code Block
    sudo userdel newuser

    To delete the user’s home directory and account, run this instead:

    Code Block
    sudo userdel -r newuser

    Both commands will automatically remove users from all added groups.

...