Run the following commands under the sudo su user:
- Create a user:
adduser username
- Set a password:
passwd username
- Change the file permissions to allow editing:
chmod -v u+w /etc/sudoers
- Enter the file editor:
vim /etc/sudoers
- The file content should be changed as follows:
root ALL=(ALL) ALL Existing line
username ALL=(ALL) ALL New line
- Change the file permissions to read-only:
chmod -v u-w /etc/sudoers