Sudo without password in Centos 8

Support for security such as Firewalls and securing linux
Post Reply
ilham
Posts: 1
Joined: 2020/05/20 12:10:46

Sudo without password in Centos 8

Post by ilham » 2020/05/20 12:37:36

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

User avatar
jlehtone
Posts: 2807
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Sudo without password in Centos 8

Post by jlehtone » 2020/05/20 14:03:17

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.

Post Reply

Return to “CentOS 8 - Security Support”