From owner-freebsd-questions@FreeBSD.ORG Sat Sep 27 09:37:32 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9285A804 for ; Sat, 27 Sep 2014 09:37:32 +0000 (UTC) Received: from land.berklix.org (land.berklix.org [144.76.10.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F8407B2 for ; Sat, 27 Sep 2014 09:37:30 +0000 (UTC) Received: from mart.js.berklix.net (p57BCF171.dip0.t-ipconnect.de [87.188.241.113]) (authenticated bits=128) by land.berklix.org (8.14.5/8.14.5) with ESMTP id s8R9YMee063960; Sat, 27 Sep 2014 09:34:23 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id s8R20Frr013750; Sat, 27 Sep 2014 04:00:16 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.7/8.14.7) with ESMTP id s8R1xvSx001300; Sat, 27 Sep 2014 04:00:09 +0200 (CEST) (envelope-from jhs@berklix.com) Message-Id: <201409270200.s8R1xvSx001300@fire.js.berklix.net> To: "firmdog@gmail.com" Subject: Re: pkg_delete bash, logged out by accident, can't ssh back in (not good) From: "Julian H. Stacey" Organization: http://berklix.com BSD Unix Linux Consultants, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Fri, 26 Sep 2014 17:14:21 -0400." Date: Sat, 27 Sep 2014 03:59:56 +0200 Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Sep 2014 09:37:32 -0000 "firmdog@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.