Solved bash broken, cannot change shell

Hi,
I am unable to access via SSH or local console on a couple of machines with FreeBSD 11.1
I am stuck with "libdl.so.1 not found" error (generally, I'd prefer using bash).
I tried to enter in single-mode user, to change shell for root and my username, but apparently without success.
I edited /etc/passwd and /etc/master.passwd (changed /usr/local/bin/bash with /bin/csh).
Anyway, after entering my password, I still get the above error.
I double-checked, I have no bash around on my passwd file.
Any suggestion?
Thank you!
 
Is this an older version of FreeBSD? The only place I've run into that was adding bash on a jail running on a host that was EOL. The exact same missing file. Some kind of pkg error. I wound up just copying /usr/local/bin/bash from another jail that had been built awhile back to the new jail, and that worked. I don't recommend it, it was done in the effort to save me a lot of work, and I got lucky that the other files that older bash used were already on the new jail.
 
Execute # chsh -s/bin/tcsh [i]your_username[/i]
 
Oh, and changing roots' shell to anything outside of base and exotic is usually a recipe for doom. Rethink that.
 
There is also a way to attempt to repair the broken bash. (But like Crivens, I would probably cry "Crivens" if I heard this was for root's shell. (Only amusing if you're a Terry Pratchett fan). You can also try (I'd love to hear the result) pkg to fix it, with
Code:
 pkg check -d bash
This will tell you about the missing shared object and ask you should it try to repair. I didn't know about pkg check when I had my own issues, but maybe if you choose y for yes to repair, it will be successful. (Thanks again to Michael Lucas's Absolute FreeBSD3, which ran through the pkg check option).
 
scottro - yes. It can mean anything from "My, that's interesting" to "I'm losing my temper and am going to boot someone."
Creating problems by setting roots' shell to bash will likely get you half way, depending if its problems with capital P and if it is easily fixed.

I know a guy who single handedly got more than 20 car assembly lines down by deploying a not matching version of some low order sub component to a machine that was in actual use, not the hot swap system.
You should always exercise the amount of caution as you would in the highest impact scenario you may encounter. And after that aftermath, many people got obsessive with practice and protocol. Do not live bad habits at home, they tend to bleed over into your professional life. And stay the heck away from setting a new root shell, that will only make it more likely you do more stuff as root as you should.
 
Back
Top