
The Unix/Linux privileged access management (PAM) solutions available on the market today provide highly efficient and effective alternatives to sudo. Sudo also forces you to rely on the individual expertise of your system administrator to plan and implement it in such a way that provides “ least privileges.” To properly use sudo you need highly skilled (and highly paid) system administrators to spend a great deal of time building and distributing sudoers files. You see, while sudo provides you with an “adequate” method for privileged access management (PAM), it is a cumbersome process with the potential to create increased risk exposure when you are trying to control access in your environment, especially if it is large and diverse. But now I am afraid I am going to have to disappoint you. OK, so now that I have provided you a brief introduction to su and sudo, and you should have an idea of how this command works and how powerful it is. This step will prevent a new user created with the same name from being accidentally given sudo privileges. Or use this command if you are a non-root user with sudo privileges:ĭerek ALL=(ALL:ALL) ALL # DELETE THIS LINE If you previously configured sudo privileges for the user you deleted, you might want to remove the relevant line again by typing: If you're running this as a non-root user with sudo privileges, you would instead type: If you prefer to delete the Derek's home directory when “derek” is removed, you can issue the following command as root: If you are signed in as another non-root user with sudo privileges, you could instead type: When Derek is done using the account you should delete him (me) from the account without deleting any of his files, by typing this as root:
#Allow user to sudo without password password
If your user (derek) is assigned to the correct group and you entered the password correctly, the sudo issued command should run with root privileges.

I highly recommend that you use a secure password when setting this up.

ssh Use the “adduser” command to add a new user to your system.Log in to your Ubuntu server as the root user. If you just need to configure sudo for an existing user, skip to step 3. Below I show you the simplest method to create a new user with sudo access-without needing to modify your server's sudoers file. The sudo command allows you to grant administrator privileges, usually only available to the root user, to regular users. If you are using Linux and you want your actions to be safe, you need to know and understand these two commands. Having root user privileges can be dangerous, but using sudo instead of su can help you keep your system more secure.

Using “sudo,” you can do pretty much the same things you can with “su.” To use it, you just have to add “sudo” in front of all root commands. Once that time expires, you have to enter your password again to regain root privilege. Also, the root privilege in “sudo” is only valid for a finite time. With “sudo,” you continue to use your user account, but with root privilege, whereas in “su,” you are actually logged into the root account. This is different from “su” which is not temporary. Sudo stands for either "substitute user do" or "super user do" and it allows you to temporarily elevate your current user account to have root privileges.

The Unix command su, stands for “substitute user,” “super user,” or “switch user,” and allows you to log in as root and do whatever you want with the system. I am going to refer to Ubuntu in this blog. Some types, such as Fedora, Red Hat, and openSuSE enable the root user, while others, such as Ubuntu and Debian, do not. Which one you use will depend on which type of Linux you have. You can either change over to the super user, also known as the root account, using the “su” command, or you can use the “sudo” command. When it comes to working with Linux, there are two ways to run administrative applications.
