Skip to content

Give special meaning to TAB in password prompt #1487

@squell

Description

@squell

Describe the feature you'd like see implemented in sudo-rs
This sounds like a reasonably easily implementable suggestion by @coderonline: #1300 (comment)

There are two things that systemd-ask-password does:

  • If the first press is a backspace, don't show the feedback.
  • If the user presses tab at any time, stop the feedback (and clear any that was already there)

(It also stops showing feedback (but not remove existing feedback) if an invalid UTF8 sequence is entered, but I would consider that a bug in systemd-ask-password)

This issue proposed to add the backspace behaviour.

What problem can be solved with this feature?
Users can turn off pwfeedback on a case-by-case basis; i.e. a user might normally want the feedback but not in certain circumstances.

Describe alternatives you've considered
Users can also use SUDO_ASKPASS=/usr/bin/systemd-ask-password in combination with sudo -A.

Of course, on a more global basis, users can also use Defaults !pwfeedback; and if they do that out of security concern rather than personal preference, they should actually be considering moving to pam_pkcs11 or pam_fprint to get two-factor or biometric authentication.

Additional context
Of course, implementing the functionality feels like it's not too hard, but then it would be a "hidden feature"; I would say that printing a text documenting this feature (and what that text should be) is something TBD later. Note that the "initial backspace" feature is also not clearly documented in systemd-ask-password.

Also, only adding "initial backspace" is slightly safer since, who knows who might have an actual TAB character in their password? ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-pamPAM libraryenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions