Comment 4 for bug 2004543

Revision history for this message
Rod Smith (rodsmith) wrote :

I'd forgotten about the sudo issue; you're right that whoami won't work reliably -- but as you say, logname should do the trick instead.

AFAIK, UID 1000 is always the default user ID in Ubuntu. That's certainly been true even on my most recent installations of 22.04. (I haven't yet done many installs of 22.10.) I did some Googling and found some posts suggesting that people sometimes try to get clever and change their default UID to 0 in an effort to get around the need to enter a password when doing sudo, but that of course creates its own problems. UID 1000 could also be missing if somebody did account maintenance post-installation -- say, by creating a second account (UID 1001) and then deleting the first (UID 1000).

Learning what went wrong from @Peter De Sousa might indeed be informative, but I expect we'll be able to reproduce and fix the bug without that feedback. Of course, that would run the risk of fixing a subtly different bug....