Quantcast
Channel: Active questions tagged terminal - Super User
Viewing all articles
Browse latest Browse all 526

Terminal returning error "bash: /usr/bin/(command) /bin/bash: bad interpreter: No such file or directory" unless command is preceded with bash

$
0
0

When I look up this particular error on the web, every single one of them are in regards to shell scripts. I keep getting this error in the terminal itself and my home server is completely unusable without booting into rescue mode because of this. The login screen is bugged and does not respond to the correct or incorrect password. The boot shows numerous [ FAILED ] lines as well.

This had begun when I had configured a particular user with a "chroot jail" and set to rbash and I have unfortunately lost the lines of code that went along with me configuring it that had led a complete disaster upon reboot.

When I send a command in rescue mode, such as "ldd /usr/bin/bash", it will return the error. However this does not occur with some basic commands (perhaps it's stuck on /bin/sh? "$SHELL" returns /bin/sh in rescue mode)

ldd /usr/bin/bashbash: /usr/bin/ldd: /bin/bash: bad interpreter: No such file or directory

HOWEVER. I found out if I precede the command with bash, it will return it correctly! Such as "bash ldd <options"

bash ldd /usr/bin/bash<relevant correct data>

It's very strange. I have set every users shell to /bin/bash but that does nothing. I am relatively new to home servers and had the knowledge to make a few basic scripts and set them to crontab or whatnot and be able to ssh from outside the network. But unfortunately I was not entirely knowledgable on the chroot jail set up and underestimated the havoc it could cause. I had followed this tutorial and had gotten to the point of copying the libraries to the jailed user when I had realized that this had made my server dysfunctional on reboot. I again apologize for no logs as I had not anticipated such and had not copied and pasted what exactly had been done.

Thank you.


Viewing all articles
Browse latest Browse all 526

Trending Articles