Date: Thu, 1 Nov 2001 12:30:18 -0000 From: "Barry Byrne" <barry.byrne@wbtsystems.com> To: "Bsd Neophyte" <bsdneophyte@yahoo.com>, <freebsd-questions@FreeBSD.ORG> Subject: RE: path problems when 'su'-ing to root... Message-ID: <NCBBIAMNAKDKFJIIGNPKCEKEGHAA.barry.byrne@wbtsystems.com> In-Reply-To: <20011101121427.72548.qmail@web20107.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NCBBIAMNAKDKFJIIGNPKCEKEGHAA.barry.byrne>