I run Ubuntu 16.04 LTS with default Unity window manager and I started getting this popup error right after I login (only when starting up the computer after shutdown; I do not get the error if I suspend and login again). I cannot access the Ctrl+Alt+F[1..12] tty's: I only get a black screen and no login/text See the popup here:

Error found when loading /etc/profile:

sudo: no tty present and no askpass program specified

As a result the session will not be configured correctly.
You should fix the problem as soon as feasible.

error popup

I tried all the possible solutions I could: I reset my /etc/profile to default (from "Getting error while starting ubuntu 14.04"), I added nomodeset to GRUB, etc, but nothing helps. I also found that I do not have a file ~/.profile if that makes any difference.


Best suggestion I have is to boot from the Live CD/USB, mount the filesystem and then edit /etc/profile.

You may also be able to add init=/bin/sh (same place you would have put nomodeset) and then run "mount -n -o remount,rw /" to get the root filesystem writable. Fix /etc/profile and then reboot.

At a guess, most likely you have a command in /etc/profile that is trying to call out to sudo. You can potentially just comment that out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.