Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 2000 19:25:31 -0500 (CDT)
From:      Mike Meyer <mwm@mired.org>
To:        Dima Dorfman <dima@unixfreak.org>
Cc:        questions@freebsd.org
Subject:   Re: changing root shell??
Message-ID:  <14823.43003.402130.967775@guru.mired.org>
In-Reply-To: <93386669@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
	Dima Dorfman writes:
> > binary was linked to a shared object library that has to be loaded every
> > time you want to run the program.  I have no clue why he would say that
> > you couldn't use it because it's dynamically linked.  Of course you can
> > use it if it's dynamically linked.  Just make sure that any libs that it
> Libc is in /usr/lib, so unless your / and /usr are on the same
> filesystem, the required libraries would be out of reach.  If you
> really want to use bash as your root shell--this is probably a bad
> idea--you can manually compile a statically-linked copy and name it
> something like /sbin/bash.static--I used to do this with tcsh before
> it was in the base system.

There's more than just separate file systems to consider. Every file
that *has* to exist before you can get to a root file is one more file
that can force you to more extreme measures if it gets
corrupted. Since you shouldn't be doing a lot as root, there's not
much point in adding that risk if you don't have to.

> > Edit /etc/passwd and change the /bin/sh or /bin/csh or what-have-you to
> > whatever you want your shell to be.
> /etc/passwd is generated from /etc/master.passwd.  You should use
> `vipw`, or failing that, edit /etc/master.passwd and rebuild the
> password databases (something like `pwd_mkdb -p /etc/passwd`, I
> think).
> > If you don't want to use vi, simply use another editor.  Instead of typing
> > vi, type pico or type emacs (assuming these are installed).
> Setting the environment variable EDITOR will make some programs--vipw,
> chsh, and crontab, for example--use the editor you specify.  In
> (t)csh, the syntax to do that is: "setenv EDITOR emacs" where emacs is
> the editor you would like to use.  I'm not sure about the (ba)sh
> syntax, but I believe it's something like "export EDITOR=emacs".

You've got bash and relatives right. You might note that the actual
sequence for many things is VISUAL (if set), the EDITOR. This is true
for vipw, even though the man page doesn't mention it. The idea was
that you would get VISUAL if your termain could support a visual
editor, otherwise EDITOR. For bash, you can add that .profile, and
other things will inherit it.

	<mike


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14823.43003.402130.967775>