Skip to content

In non-interactive, sudo fail to with 'sudo: a password is required' #65

@gzm55

Description

@gzm55

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions