Adding Users to Sudo on Linux

The term sudo in Linux is made to run the super user as root, but login as user (not login as root). The use of sudo users is highly recommended, because it anticipates running command errors (human error) and other security issues.


To add sudo users, first login as root, then :


$ visudo

When there is a choice, select the recommended or easiest one.


Then look for a line like the one below.


## Allow root to run any commands anywhere
root ALL=(ALL) ALL


Add the desired user. Suppose the user you want to add is a normal user. Then modify the line to look like this:


## Allow root to run any commands anywhere
root ALL=(ALL) ALL
biasa ALL=(ALL) ALL


Then save the editor by: ctrl + x then select y

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.