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/bash bash: /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.
ln /usr/bin/bash /bin/bashbut had gotten the following response.
ln: failed to create hard link '/bin/bash' => '/usr/bin/bash': No such file or directory.---- There was another comment on this post that might've gotten deleted as I do not see it anymore but I had done the following
ls -ld /bin /usr/bin/bash /usr/bin/bash /usr/bin/ldd /lib /usr/libeverything seemed normal except:
ls : cannot access '/bin': No such file or directoryBut bin does exist in /usr/local/bin.
lrwxrwxrwx 1 root root ? (month) (day) (time) /bin -> usr/binThis is what I get on a correct set up. But my broken server is only responding with:
ls : cannot access '/bin': No such file or directoryI don't know how to solve it.