From owner-freebsd-questions@FreeBSD.ORG Mon Jul 5 01:30:26 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9937106564A for ; Mon, 5 Jul 2010 01:30:26 +0000 (UTC) (envelope-from subhro.kar@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 84F8B8FC0C for ; Mon, 5 Jul 2010 01:30:26 +0000 (UTC) Received: by pwj9 with SMTP id 9so1441529pwj.13 for ; Sun, 04 Jul 2010 18:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:message-id:references:to :x-mailer; bh=ZBPZ56o8Fl8/5SR8n0hSXbBvPn591egCELKFbhoTMTg=; b=Aisffxx6Ycd2UmjzBbUodRo1yZwr6g3MaAx6nt6XlYrrjMyUkuT2hZdivVAWv/zN8l 0gmIAZFi/xVXDC/40k2Ayt0Ii3B1JETurRuWB2NydSiE/Id4Buo2a2sVw5U/dXohaTh4 Gf6BOY/LZOs1yeKC9fOubsqhsxreVLYhqYcEo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer; b=iFOxZyaEPv6Q/Zo21/8+41iDefwCqnq2beHHk+nJQ79RwEl+0HFLjt2ps8mECKlo1o 3VUAoQkL85PSfpGx36JVlE/gBI6Q+bWEp5cbnBhCx+NRvJCPPmSxXVvO+YSxmY5uwM1w vfMrZwsCvnQQ4fjimgMCTqQIw4DkbeB30f0p0= Received: by 10.142.207.5 with SMTP id e5mr528830wfg.141.1278291809602; Sun, 04 Jul 2010 18:03:29 -0700 (PDT) Received: from [192.168.137.109] ([115.117.38.69]) by mx.google.com with ESMTPS id f20sm3851457rvb.8.2010.07.04.18.03.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 04 Jul 2010 18:03:28 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/signed; boundary=Apple-Mail-1--663108131; protocol="application/pkcs7-signature"; micalg=sha1 From: Subhro Kar In-Reply-To: <20100704161806.GA10779@gothschlampen.com> Date: Mon, 5 Jul 2010 06:33:22 +0530 Message-Id: <32828DBC-024F-4B50-ACBA-54FDEC298393@gmail.com> References: <20100704161806.GA10779@gothschlampen.com> To: Thomas Keusch , Luca Renaud X-Mailer: Apple Mail (2.1081) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Get access to csh (default freebsd shell) for root to solve login problem. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2010 01:30:26 -0000 --Apple-Mail-1--663108131 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 04-Jul-2010, at 9:48 PM, Thomas Keusch wrote: > On Sun, Jul 04, 2010 at 05:02:59PM +0100, Luca Renaud wrote: >=20 > Hi, >=20 >> The root shell is now bash,but I was unaware that bash was not >> self-contained(it depends at least of libintl.so.8), >> and doing some upgrades with ports I erased libintl.so.8,now I cannot = access >> the root account because bash is >> not operational and I need root access to install again = libintl.so.8,or any >> other way to solve the problem. >> So,how can I get access to csh for root without having access to a = root >> shell(the previously defined bash does >> not work,and I need root access to change the shell for the root = acount). >=20 > if you haven't activated the 'toor' account (another UID 0 account = besides > root), you'll have to boot from fixit media (or another live cd / = system) and > go from there. I think that would be an overkill. =46rom the su(1) manpage,=20 -m Leave the environment unmodified. The invoked shell is = your login shell, and no directory changes are made. As a = security precaution, if the target user's shell is a non-standard = shell (as defined by getusershell(3)) and the caller's real uid = is non- zero, su will fail. So, you could use su -m to switch to root and remain in the same shell = as your user calling su. Once there, AFAIK, you could use vipw(8) or = chsh(1) to change the root shell back to csh. Thanks Subhro -- Subhro Kar Blog: http://80386.org Twitter: http://twitter.com/subhrokar FaceBook: http://www.facebook.com/subhrokar= --Apple-Mail-1--663108131--