Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

use_pty should be off for root

Open
#338 3 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, linux
Domain
cli, security

Research direction

Read the code or default sudoers configuration that sets the use_pty option, then check how defaults are applied when the target user is root. The issue suggests adding Defaults>root !use_pty; confirm the behavior with an interactive sudo command that reproduces the typeahead break. Done when root commands no longer use a PTY by default and typeahead works.

Written by the indexing model from the issue text.

Description

The use_pty option was recently turned on by default (cf. #358). While this makes sense when for non-root target users, it does not make sense for root, and it breaks typeahead in the extremely common case of using sudo to run adminstrative commands interactively in a terminal. Please turn it off for root, either in code or by adding the following line to the default sudoers file:

Defaults>root !use_pty
Dominant language
C
Stars
1.7k
Forks
306
Avg merge
1d 2h
Merged PRs (30d)
22

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sudo-project/sudo

All issues in sudo-project/sudo

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.