From owner-freebsd-questions Thu Nov 1 4:30:39 2001 Delivered-To: freebsd-questions@freebsd.org Received: from marble.dublin.wbtsystems.com (marble.dublin.wbtsystems.com [193.120.231.8]) by hub.freebsd.org (Postfix) with ESMTP id 6AAFE37B406 for ; Thu, 1 Nov 2001 04:30:32 -0800 (PST) Received: from SUNYA (SUNYA.dublin.wbtsystems.com [193.120.231.190]) (authenticated) by marble.dublin.wbtsystems.com (8.11.6/8.11.6) with ESMTP id fA1CUMF13866; Thu, 1 Nov 2001 12:30:22 GMT From: "Barry Byrne" To: "Bsd Neophyte" , Subject: RE: path problems when 'su'-ing to root... Date: Thu, 1 Nov 2001 12:30:18 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20011101121427.72548.qmail@web20107.mail.yahoo.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > I've noticed this on both FreeBSD machine (and on my Sparc 20 as well)... > whenever I 'su' as root, my "path" gets all screwed up. Sameer: Check the dot files in /root If you use sh or variants it would be /root/.profile Solaris has an SUPATH which you might want to check out /etc/default/su > Another thing I noticed... is that I need to type "./" before each command > otherwise the command won't work. Unless you include '.' in your path, which is generally frowned upon, you will need need to specify the path to any command not already in PATH. Cheers, Barry -- Barry Byrne, IT Manager, WBT Systems, Block 2, Harcourt Centre Harcourt Street, Dublin 2, Ireland Phone: +353 1 417 0150 Fax: +353 1 478 5544 Email: barry.byrne@wbtsystems.com Web: www.wbtsystems.com > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Bsd Neophyte > Sent: 01 November 2001 12:14 > To: freebsd-questions@FreeBSD.ORG > Subject: path problems when 'su'-ing to root... > > > > I asked this question before, and I didn't really get an answer that could > help me out. > > I'm sure the answer is pretty simple... but I don't know where to find a > straigh-forward and concise solution to my problem (I really don't think > reading thick shell manuals will help me here). > > I've noticed this on both FreeBSD machine (and on my Sparc 20 as well)... > whenever I 'su' as root, my "path" gets all screwed up. > > When I login as root directly, I can access files in say, /usr/local/sbin > or something... but when I 'su' to root from my usual user account, I > can't access the files /usr/local/sbin, w/o typing the entire path first. > I can access files in /usr/local/sbin as a normal user w/o entering the > entire path and i can do it as root when I log in as root, but not when I > 'su'. > > Another thing I noticed... is that I need to type "./" before each command > otherwise the command won't work. > > What's going on here? Is there a special .bashrc or .profile or some sort > of file that is used when you specifically 'su' to root? > > Any and all help will be appreciated. > > -Sameer > > > __________________________________________________ > Do You Yahoo!? > Make a great connection at Yahoo! Personals. > http://personals.yahoo.com > > 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