Skip to content

authd's password prompt is not shown when stdout is redirected #1230

@adombeck

Description

@adombeck

The password prompt of su is printed to stderr, so it's also shown when stdout is redirected:

su > /dev/null
Password:

The password prompt of sudo is printed even when both stdout and stderr are redirected:

sudo ls >/dev/null 2>&1 
[sudo] password for user:

For authd users, those password prompts are not shown but instead the password prompt of the authd PAM module is shown:

sudo ls
Enter your local password:                                                                                                    
>                                                                                                                             

That password prompt is not shown when stdout is redirected:

sudo ls > /dev/null

In effect, commands like sudo ls | grep foo block without printing anything.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions