Difference between revisions of "Sudo"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 5: Line 5:
 
== Task ==
 
== Task ==
 
* Allow user YOUR_USER_NAME to run sudo commands without typing the password:  
 
* Allow user YOUR_USER_NAME to run sudo commands without typing the password:  
Include in <code>/etc/sudoers</code>, using the <code>visudo</code> command, the following line at the end of the file:
+
Include in <code>[[/etc/sudoers]]</code>, using the <code>visudo</code> command, the following line at the end of the file:
  
 
<code>YOUR_USER_NAME ALL=(ALL) NOPASSWD:ALL</code><ref>https://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-password</ref>
 
<code>YOUR_USER_NAME ALL=(ALL) NOPASSWD:ALL</code><ref>https://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-password</ref>

Revision as of 08:26, 19 August 2020

sudo is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user.

  • Add user to sudo group: sudo usermod -aG sudo YOUR_USERNAME

Task

  • Allow user YOUR_USER_NAME to run sudo commands without typing the password:

Include in /etc/sudoers, using the visudo command, the following line at the end of the file:

YOUR_USER_NAME ALL=(ALL) NOPASSWD:ALL[1]

Security vulnerabilities

Exploitable if the following configuration is present:

username hostname = (ALL, !root) path-to-command

Errors

sudo: unable to resolve host
See: resolv.conf

Options

See also

  • https://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-password
  • Advertising: