Page 1 of 1

Sudo without password in Centos 8

Posted: 2020/05/20 12:37:36
by ilham
Hi everyone,

is config for sudo without password still same in centos 8, because i use this in centos 7 is running well but not in centos 8, it still asking for password

username ALL=(ALL) NOPASSWD:ALL

Regards

Re: Sudo without password in Centos 8

Posted: 2020/05/20 14:03:17
by jlehtone
Probably, but I have:
pam_ssh_agent_auth installed

Code: Select all

$ sudo cat /etc/sudoers.d/username
Defaults env_keep += "SSH_AUTH_SOCK"
username ALL = ALL

$ sudo ls -l /etc/sudoers.d/jvl
-r--r-----. 1 root root 56 Jan  1  1970 /etc/sudoers.d/username
and

Code: Select all

auth sufficient pam_ssh_agent_auth.so file=%h/.ssh/authorized_keys
in /etc/pam.d/sudo

Gnome offers ssh key from its keyring to sudo.