Skip to content

Provide user custom prompts to PAM modules not using sudo PAM conversation #1594

Description

@3v1n0

Describe the feature you'd like see implemented in sudo-rs

PAM Modules may or may not rely on the conversation that sudo is providing to get the user password, especially when the authentication flow is more complex or may rely on third party (UI) apps.

In such cases, if sudo -p prompt is used, the prompt is lost, because sudo exposes it only during the conversation.

What problem can be solved with this feature?

To prevent this, we could expose a SUDO_PROMPT PAM env variable where such value is shared so that modules can rely on it.

Describe alternatives you've considered

There are not many available, relying on the actual SUDO_PROMPT system env variable is possible when set, but modules should not care about system envs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions