[sudo-users] No TTY present message on UART and display. Troubleshooting help required.

Todd C. Miller Todd.Miller at sudo.ws
Mon May 27 08:27:24 MDT 2019


On Mon, 27 May 2019 16:31:12 +0300, Semion Nadezhdin wrote:

> I am completely at loss: suddenly sudo started to complain about no tty 
> being present. The deal is with uart and display tty(/dev/tty1 and 
> /dev/console agettys). Is there a way to troubleshoot what is actually 
> missing for sudo to recognize tty being present? Executing tty command 
> in the same terminal returns proper /dev/tty1 and /dev/console 
> accordingly. Custom linux distro with latest major kernel version.

The sudo debug output may provide some more information.  Add the
following line to /etc/sudo.conf (creating it if needed).

Debug sudo /var/log/sudo_debug util at debug

You should see lines referencing get_process_ttyname, sudo_ttyname_dev_v1,
sudo_ttyname_scan and sudo_dev_check in the debug log.

On Linux, sudo gets the tty based field 7 of /proc/self/stat and
then tries to find the device name that corresponds to that device
number in /dev.

 - todd


More information about the sudo-users mailing list