0

I'm using Ubuntu 14.04. While updating TeXLive I changed the PATH in an obviously wrong way. Now I can't log in: when I enter the correct password it comes back to the log in page.

I connected on tty1 using CTRL+Alt+F1. I got the error message

compaudit:105: command not found: getent

The error probably comes from PATH as

echo $PATH

returns only the path to texlive. The problem is I cannot edit any file since no commands are recognized (vim,nano, etc.)!

How can I overcome this? Any help appreciated as I am completely stuck.

1

You could have still startd the programs with their full path, for example /usr/bin/vim. Since most programs didn't work for you, you could have checked packages.ubuntu.com for their paths: http://packages.ubuntu.com/trusty/amd64/nano/filelist

Alternatively you could have booted into recovery mode and opened a shell there I guess.

1
  • The recovery mode did not work as I had to log in. Indeed for the full path! – anderstood Aug 30 '15 at 15:47
0

I just managed to solve my problem, this is how. I did not have a LiveUSB Linux so I rebooted with my Windows partition. I then installed ext2fsd on Windows and was able to read my partition with Ubuntu. I corrected the erroneous $PATH$ (I had made an mistake in the file \etc\environment) and rebooted.

Note that modifying a linux system file from windows is not recommended (I had got a "hard drive error" on the first Ubuntu boot after the modification from linux). I would rather recommend using a USB stick with a live version of Ubuntu.

I am still interested in any other solution, if any.

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.