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
user ALL=NOPASSWD: ALL
[:wq]
Now, your user “user” can install new packages with sudo apt-get install, but he will not be asked to type his password.
Leave a Reply