From owner-freebsd-questions Thu Dec 2 11:30:41 1999 Delivered-To: freebsd-questions@freebsd.org Received: from andrsn.stanford.edu (andrsn.Stanford.EDU [36.33.0.163]) by hub.freebsd.org (Postfix) with ESMTP id 62D5C14E39 for ; Thu, 2 Dec 1999 11:30:36 -0800 (PST) (envelope-from andrsn@andrsn.stanford.edu) Received: from localhost (andrsn@localhost.stanford.edu [127.0.0.1]) by andrsn.stanford.edu (8.9.3/8.9.1) with ESMTP id LAA12465; Thu, 2 Dec 1999 11:29:58 -0800 (PST) Date: Thu, 2 Dec 1999 11:29:57 -0800 (PST) From: Annelise Anderson To: Jonathon McKitrick Cc: Phil Homewood , Alfred Perlstein , freebsd-questions@FreeBSD.ORG Subject: Re: root shell/toor shell In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Each shell has its own set of files that it reads, and some syntax unique to it. zsh should be reading .profile, but not .cshrc. It reads .zshrc. It is convenient to make text copies of zsh's man pages and put them in a directory where you can search them for key words, since they are long. Since there are times when you may specifically want to use a particular shell, I don't think calling a different shell automatically is a very good idea. I think a good way to get at changing root's shell is to first set up toor with (the default) sh shell, give toor a password, and make sure it works. Then you can change root's shell to your preference with the security of a working back-up. I have zsh set up so that when I su to root, the prompt changes to so indicate, but the history from the user is maintained. This only works with the older version of zsh. Annelise On Thu, 2 Dec 1999, Jonathon McKitrick wrote: > >Alfred Perlstein wrote: > >> In re changing root's/toor's shell, why not just put som,e code in > >> your .profile/.cshrc that conditionally automagically exec's zsh/bash > >> if it's available? :) > >> > >> if [ -x /usr/local/bin/zsh ] ; then > >> exec /usr/local/bin/zsh ; > >> fi > > I would like to use this for my 'toor' user, but how do i preserve all my > aliases and shell variables? I see lots of stuff going on in .cshrc and i > put some extra stuff in .profile, but when i run zsh or bash after my > prompt comes up, all that info is lost in the new shell. Is there a way > to preserve it? > > > -jm > > ------------------ > Bayliss: "And that's another thing... > you never say 'please' and 'thank you.'" > > Pendleton: "Please stop being an idiot. Thank you." > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message