just an hour ago, I installed some package which was supposed to solve the problem with dead keys. After that I restarted my laptop and could not log in because of infinite loop with the login page. I can use the user account but what can I do from it?

I cannot access BIOS, booting from USB does not work. I tried to switch from GUI to the shell Str+Alt+F3 and login in using my superuser credentials but sudo is not recognized in the shell. This is the error message I got:

Command ´Sudo´ is available in /usr/bin/sudo this command cound not be located because /usr/bin is not included in the PATH environment variable. Sudo command not found.

Im begging for help.

  • I already saw the answer, nothing of that helped since I cannot use sudo command in the shell. – user3428703 Aug 29 '14 at 22:44
  • Have you tried executing sudo with the full path i.e. /usr/bin/sudo somecommand? Have you tried resetting your PATH variable from the Ctrl-Alt-F3 login? – steeldriver Aug 29 '14 at 22:51
  • thank you for the response. I had to admit that I switched to ubuntu from Windows 7 only today...had some working experience with ubuntu in the past but Im not a programmer after all. Im just a chemist. I would be grateful for your guidance here. I will try now full sudo path. Not sure I understand how to reset PATH, though? – user3428703 Aug 29 '14 at 22:55
  • looks like I found the root of the problem. ./profile. PATH="$PATH:/home/alex/mipav" PATH="$PATH:/etc/fsl/5.0/fsl.sh" ". /etc/fsl/5.0/fsl.sh" export DIALOG_SLEEP=4 – user3428703 Aug 29 '14 at 23:25
  • How to roll back the changes made to the ./profile? Or can I correct the file from the shell? – user3428703 Aug 29 '14 at 23:28
  1. Try booting from CD/DVD or network.

  2. Instead of sudo, try /usr/bin/sudo or add PATH: export PATH=$PATH:/usr/bin

  3. Try booting into recovery mode: https://wiki.ubuntu.com/RecoveryMode

  4. There is an option in grub to boot into single user mode (as root), usualy it requires adding single to kernel options and updating grub, but I guess it can also be done in grub command line manually.

|improve this answer|||||
  • I'm not sure I understand how which sudo helps in this situation - doesn't it just search exactly the same executable PATH? – steeldriver Aug 29 '14 at 23:10
  • You are 100% right. – przemo Aug 29 '14 at 23:13

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