The pam plugin should be correctly setup:
$ sudo -k id
uid=0(root) gid=0(root) groups=0(root)
the secure log
pam_ssh_agent(sudo:auth): Authenticating using ssh-agent at '/tmp/ssh-1EYwKbGPJs/agent.88681', keys from '/etc/security/authorized_keys.d/user'
pam_unix(sudo:session): session opened for user root by user(uid=0)
pam_unix(sudo:session): session closed for user root
But when run in non-interactive mode, we have errors
$ sudo -kn id
sudo: a password is required
And the secure log has not output.
I expect sudo -kn id should also run the id command.
The pam plugin should be correctly setup:
the secure log
But when run in non-interactive mode, we have errors
And the secure log has not output.
I expect
sudo -kn idshould also run the id command.