Post-login - sudo elevation

avatar

For all SSH sessions, I used one universal setting and it worked. Waiting for `password` works even for distros that have no text at all. But with Ubuntu 26, this stopped working because the text changed.
This also works for RHEL. But however you look at it, waiting for a specific word is a very hacky method. Can't you make a smart password input based on console readiness / line change?

изображение.png


ubuntu24, keyword `password`
sudo -i
[sudo] password for name:

ubuntu26, keyword `password`
sudo -i
name@name:~$ sudo -i
[sudo: authenticate] Password:

ubuntu26, keyword `sudo`
sudo -i
[sudo: authenticate] Password:

debian 11+, no keyword:
sudo -i
[sudo] password for awx:
Sorry, try again.

xen:
sudo -i
# ^C

изображение.png

All Comments (0)