1

In my administrator account, from terminal I use the following command(mistakenly)

  1. gedit ~/.pam_environment
  2. PATH=/home/acer:$PATH
  3. Save and close the file.
  4. Restart the computer to initialize the new PATH variable.

After that, I can't open the account using earlier password. So can't install anything.

muru
  • 197,895
  • 55
  • 485
  • 740
BADAL
  • 11

1 Answers1

2

~/.pam_environment isn't evaluated by a shell but by the pam_env PAM module. So you can't use shell syntax like $PATH there and your $PATH is now set to literally /home/acer:$PATH so programs in /bin/, /usr/bin/, ... aren't found.

Boot into recovery mode (see How do I boot into a root shell?) and edit or remove your .pam_environment.