From owner-freebsd-questions Tue Feb 18 17:00:16 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id RAA16611 for questions-outgoing; Tue, 18 Feb 1997 17:00:16 -0800 (PST) Received: from gdi.uoregon.edu (gdi.uoregon.edu [128.223.170.30]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id RAA16591 for ; Tue, 18 Feb 1997 17:00:11 -0800 (PST) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.5/8.6.12) with SMTP id QAA08987; Tue, 18 Feb 1997 16:59:56 -0800 (PST) Date: Tue, 18 Feb 1997 16:59:56 -0800 (PST) From: Doug White X-Sender: dwhite@localhost Reply-To: Doug White To: Brandon Gillespie cc: freebsd-questions@freebsd.org Subject: Re: su to root changes directory?? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 18 Feb 1997, Brandon Gillespie wrote: > Help.. Has anything changed in the behaviour of 'su' between 2.1.x and > 2.2?? I just changed a system (through a clean install) from 2.1.0 to > 2.2. Previously when I would su it would leave me in the same directory.. > But now it keeps moving me to root's home directory. I have searched > everywhere for something that may be doing this--I have removed every > single rc and login file I can find (well, I moved them to a /tmp/x > directory so they wouldn't be loaded--the files include every .x file in > /root and /etc/csh*) and it STILL changes to /root. I'm running csh as > root's shell, altho I even tried switching to /bin/sh and > /usr/local/bin/tcsh > > Any ideas WHY its doing this, and how I can STOP IT? Make sure you are running 'su -m' instead of just 'su'. This way, your environment is preserved across the su. This was set up in the system default .cshrc as an alias on my machine. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major