...
Connect to your server through PuTTY. If you don’t already have PuTTY installed, please follow the link SSH to Instance using Windows.
Create new user, for example
newuser
, and give the user a password with the following commands:Code Block sudo adduser newuser sudo passwd newuser
To give the user sudo permissions, add the user to the group
wheel
, which gives sudo access to all its members.Code Block sudo usermod -aG wheel newuser
The function
lid
shows which groups a user belongs to. Using functionlid
with-g
flag will show which users belong in the indicated group.
The following will show the usernames of those in the groupwheel
.Code Block sudo lid -g wheel
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.
...