Date: Mon, 5 Jul 2010 06:33:22 +0530 From: Subhro Kar <subhro.kar@gmail.com> To: Thomas Keusch <fwd@bsd-solutions-duesseldorf.de>, Luca Renaud <renaud.luca@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Get access to csh (default freebsd shell) for root to solve login problem. Message-ID: <32828DBC-024F-4B50-ACBA-54FDEC298393@gmail.com> In-Reply-To: <20100704161806.GA10779@gothschlampen.com> References: <AANLkTimr2ikyYisgMqJ6jyYmlkQgtsq3l53gRHaZVF8i@mail.gmail.com> <20100704161806.GA10779@gothschlampen.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?32828DBC-024F-4B50-ACBA-54FDEC298393>