How to give passwordless root priviledges to a normal user

To give root priviledges to a normal user, you need to edit the /etc/sudoers file. Do not edit the /etc/sudoers file by hand, because you may damage it. Use visudo.

visudo opens the /etc/sudoers file in the default text editor. The shell will warn you if you write something wrong there.

>>> /etc/sudoers: syntax error near line 21 <<<
What now?
Options are:
(e)dit sudoers file again
e(x)it without saving changes to sudoers file
(Q)uit and save changes to sudoers file (DANGER!)

What now?

How to give passwordless root priviledges to a normal user:

Append this line to /etc/sudoers: user ALL=NOPASSWD: ALL .

# visudo

Now, your user “user” can install new packages with sudo apt-get install, but he will not be asked to type his password.

Liked it? Take a second to support Geekster on Patreon!
Tagged with: , ,
Posted in The Linux and Unix Articles!

Leave a Reply

Your email address will not be published. Required fields are marked *


Support LinuxG via Patreon
Support on Patreon!


Subscribe to get the latest Linux news and how to guides directly on your e-mail!