Difference between revisions of "Enable passwordless sudo for a specific user"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
  
  
== Passwordless sudo using [[Ansible]] ==
 
  
#![[/usr/bin/env]] [[ansible-playbook]]
+
* Ansible: [[Configure user to be able to use sudo with no password]]
 
- hosts: YOUR_MACHINE
 
  tasks:
 
    - [[lineinfile]]:
 
        path: [[/etc/sudoers]]
 
        state: present
 
        regexp: '^%sudo'
 
        line: '%sudo ALL=(ALL) [[NOPASSWD]]: ALL'
 
        validate: '[[visudo]] -cf %s'
 
  
 
== Activities ==
 
== Activities ==

Revision as of 03:22, 16 August 2021

Advertising: