Difference between revisions of "Enable passwordless sudo for a specific user"
Jump to navigation
Jump to search
Line 27: | Line 27: | ||
* <code>[[useradd]]</code> | * <code>[[useradd]]</code> | ||
* [[DevOps/Ansible/Configure user to be able to use sudo with no password]] | * [[DevOps/Ansible/Configure user to be able to use sudo with no password]] | ||
− | * [[ | + | * [[Ansible]] |
* [[vim]] | * [[vim]] | ||
+ | * {{OpenSSH}} | ||
[[Category:Linux]] | [[Category:Linux]] |
Revision as of 12:30, 26 December 2019
Passwordless sudo using Ansible
#!/usr/bin/env ansible-playbook - hosts: YOUR_MACHINE tasks: - lineinfile: path: /etc/sudoers state: present regexp: '^%sudo' line: '%sudo ALL=(ALL) NOPASSWD: ALL' validate: 'visudo -cf %s'
Activities
- Understand order rules are applied and impact: https://vim.fandom.com/wiki/Set_Vim_as_your_default_editor_for_Unix
See also
sudo
,visudo
,su, passwd, sudo su
,Passwordless sudo
,/etc/sudoers
,/etc/sudoers.d/
,/etc/sudoers
,sudo --help
useradd
- DevOps/Ansible/Configure user to be able to use sudo with no password
- Ansible
- vim
- OpenSSH (changelog):
/etc/ssh/sshd_config
|/etc/ssh/ssh_config
|~/.ssh/
|openSSL | sshd logs
|sftp
|scp
|authorized_keys
|ssh-keygen
|ssh-keyscan
|ssh-add
|ssh-agent
|ssh
|Ssh -O stop
|ssh-copy-id
|CheckHostIP
|UseKeychain
, OpenSSF
Advertising: