How do I give a user sudo access?
- SSH into your VPS. For Self Managed VPSs, the SSH port is 2222.
- If you haven’t already, create a user using the following command (change “vipsupport” to whichever username you like):
- Set a password for the newly created user:
- This user can now SSH into your VPS with the password you just set; however, they will not have any root user privileges. To add these, open the /etc/sudoers file by running the command:
- Scroll to the bottom of this file and add the user you just created.
- To give this user full root permissions, add the following line:
- To limit the user to only certain commands, for example “mount” or “su - root”:
- To give this user full root permissions, add the following line:
- To exit the visudo editor, type:
<escape> :wq <enter>