0

This never happened to me before, but I cannot log in as root. After typing in password, it says

Last failed login:

bin/bash: No such file or directory Connection closed.

Besides contacting my provider, I am not sure what to do. But often they don't help, as it is not a "managed" account...by them anyway.

Today I did the command sudo purge on my home computer imac the terminal of which is used to connect to remote server... I am not sure if it could be that? I was making space for ADOBE applications having trouble running.

Other than that I can't think of anything. But I've now deleted the /etc/ssh keys list - so probably made a mess of things.

UPDATE: the provider says /lib64 missing altogether in which case how could that happen and how have I logged in previously if that is the case?

  • 1
    Looks like your password file entry (in /etc/passwd) has had the leading slash / removed from your shell choice. Log in via another user and use sudo, and then fix the password entry (sudo chsh root), or failing that boot in single user mode and issue the command that way (single user on most UNIXs will fall back to /bin/sh when the shell set for root is missing). – Drav Sloan Aug 6 '15 at 13:36
  • it won't let me log in as other user either. – cea Aug 6 '15 at 22:41
  • Then maybe bash has been deleted? I think you may have to go down the single user mode, and log in via root that way. – Drav Sloan Aug 7 '15 at 15:53
  • what is the single user mode? anyway i think i deleted accidentally libraries while untaring something. in any case the provider booted from recovery and got in replacing missing libraries so now working. – cea Aug 8 '15 at 3:20
  • You can boot the linux kernel with the "single" or "-s" flag. Then rather than continuing into "multiuser mode", it stops and prompts for root's login password and will log you in with root's chosen a shell, or /bin/sh if that fails. It's kind of like recovery mode, but requires little or no major damage to the OS. – Drav Sloan Aug 8 '15 at 10:20

Your Answer

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

Browse other questions tagged or ask your own question.