Re: root /etc/csh
- From: Mel <fbsd.questions@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 11 Nov 2008 08:49:55 +0100
On Tuesday 11 November 2008 00:19:32 Daniel Howard wrote:
On Mon, Nov 10, 2008 at 1:46 PM, Pieter Donche <Pieter.Donche@xxxxxxxx>wrote:
FreeBSD 7.0 comes with the user root with start up shell /bin/csh
As normal user I use bash (/usr/local/bin/bash installed)
I would prefer to have bash also when working as root (su).
Of course I can do
# bash
[root ~]# or I could change the startup shell in /etc/passwd, but would
that be a wise
thing to do or not?
If your system is having a bad time, falling back to statically-linked
/bin/csh
/bin/csh is not statically linked. /rescue/csh is.
can help you out in a jam, whereas pointing way off to
/usr/local/bin/bash could spell trouble if say, you can not mount
/usr.
More likely trouble scenario is gettext library version bump. However, bash
can be statically compiled by the port and you can also set $PREFIX to /, so
it gets installed as /bin/bash.
That said, you should before you change root's shell have dealt with a broken
root shell a few times, to be able to ascertain whether this extra problem is
something you want to deal with, at the times you already have a more
pressing problem to solve.
As prad pointed out, you can "su -m". I myself prefer "sudo -s".
Unfortunately, sudo -i is not a substitute for su -l, as sudo tries to be more
secure then it should be, cleaning the environment, preserving PATH, rather
then taking the correct values from /etc/login.conf. Most notably tilde and
dollar sign expansion, which are great *shell-independant* features:
$ grep setenv /etc/login.conf
:setenv=MAIL=/var/mail/$,BLOCKSIZE=M,FTP_PASSIVE_MODE=YES,PACKAGES=/var/pkg/7-stable,PKG_PATH=/var/pkg/7-stable\c.
\c/home/$/packages,CCACHE_DIR=/var/db/ccache/$:\
$ echo {$CCACHE_DIR:=No}
/var/db/ccache/mel
$ echo $MAIL
/var/mail/mel
$ sudo -c root -i
# echo ${CCACHE_DIR:=No}
No
# echo $MAIL
/var/mail/mel
--
Mel
Problem with today's modular software: they start with the modules
and never get to the software part.
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
- References:
- PATH problem
- From: Albert Shih
- root /etc/csh
- From: Pieter Donche
- Re: root /etc/csh
- From: Daniel Howard
- PATH problem
- Prev by Date: Re: High load - lost network
- Next by Date: Re: Strange messages by fetchmail: Server certificate verification error
- Previous by thread: Re: root /etc/csh
- Next by thread: Re: root /etc/csh
- Index(es):
Relevant Pages
|