canonical / canonical/authd

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

Open
#1,230 10 comments 0 reactions 1 assignee Claimed by @3v1n0 View on GitHub
Dominant language
Go
Stars
308
Forks
41
Avg merge
2d 4h
Merged PRs (30d)
58

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.