How to make new user and Delete a user and grant the user with sudo priviliges - Printable Version +- Post4VPS Forum | Free VPS Provider (https://post4vps.com) +-- Forum: VPS Discussion (https://post4vps.com/Forum-VPS-Discussion) +--- Forum: Tutorials (https://post4vps.com/Forum-Tutorials) +--- Thread: How to make new user and Delete a user and grant the user with sudo priviliges (/Thread-How-to-make-new-user-and-Delete-a-user-and-grant-the-user-with-sudo-priviliges) |
How to make new user and Delete a user and grant the user with sudo priviliges - Honey - 04-27-2016 Hello guys, Today I'll show you how to create a new user.The reason for creating a new user rather than using root is that using root as the main user can cause security risks secondly if several people are using your VPS you will have to make other users too. When you perform any root tasks with the new user, you will need to use the word “sudo” before the command. This is a helpful command for 2 reasons: 1) it prevents the user making any system-destroying mistakes 2) it stores all the commands run with sudo to a file where can be reviewed later if needed. Remember : that sudo is as powerful as the root user. If you only need a user for a limited number of tasks on the VPS, you do not need to give them root privileges. Requirements : This tutorial requires access to the root user or a user with sudo privileges. Secondly This TUT works for Ubuntu, It may work on other too. TUT : To add a new user in Ubuntu, use the adduser command, replacing the “username” with your preferred username. Code: sudo adduser username
Code: exit How To Grant The New User with Root Privileges : You can create the sudo user by opening the sudoers file with this command: Code: sudo /usr/sbin/visudo Code: # User privilege specification Code: :wq How To Delete the new user afterwards : ]If you think that you no longer want to have a specific user on the vps then you can delete them with a single command: Code: sudo userdel username Code: sudo rm -rf /home/newuser |