pkg_delete bash, logged out by accident, can't ssh back in (not good)
Julian H. Stacey
jhs at berklix.com
Sat Sep 27 09:37:32 UTC 2014
"firmdog at gmail.com" wrote:
> Oh boy. I have only 2 accounts on this box. Root and one other
> account. Both use bash as default.
I saw you ;ater "happen to have a shell open from a laptop"
before I finished this mail, Congrats !
But in case others are some day in a similar hole, other ideas:
What about toor, did you set a password for it as a lifeboat ?
(though 9.2 by default has no CLI specified, it doesnt stop a login, I checked)
> I am completely locked out of this box on the command line?
Do you by chance have root priveleged amd & nfs from another box
(OK, you shouldn't if remote outside a secure net, but you might ;-)
... if you do, then manipulate /etc pwd stuff
or cp in a local/bin/bash or simply ln a sh to bash.
If you have ssh keys intact for root ?
Repairing deviously with eg
rdist6 -P /usr/bin/ssh -f a-special-distfile-pointing-to-a-spare-bash-to-be-copied-in
Presumably also possible with rsync (but I happen to use rdist6 )
Did you leave any loopholes in
/etc/hosts.equiv
/etc/shosts.equiv
Did you leave rshd, or rexecd enabled
Cheers,
Julian
--
Julian Stacey, BSD Linux Unix C Sys Eng Consultant Munich http://berklix.com
Indent previous with "> ". Interleave reply paragraphs like a play script.
Send plain text, not quoted-printable, HTML, base64, or multipart/alternative.
More information about the freebsd-questions
mailing list