Date: Thu, 15 Sep 2005 20:03:33 -0700 From: Dave Webster <dwebman@telus.net> To: Alex Zbyslaw <xfb52@dial.pipex.com> Cc: FreeBSD questions <freebsd-questions@freebsd.org> Subject: Re: can't run /sbin commands Message-ID: <1126839813.1303.2.camel@localhost> In-Reply-To: <43293A7F.9050607@dial.pipex.com> References: <1126765442.5238.13.camel@localhost> <43293A7F.9050607@dial.pipex.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks Alex, Looking at my .tcshrc file I saw the shell variable path set as: set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin) but the environment variable PATH set as: setenv PATH "{$PATH}:$FORREST_HOME/bin" I removed the ""s and everything works fine. Acroread7 installed fine. I'm a happy camper. Thanks for your help. Dave PS. Is there some good reference to explain shell variables and environment variables, how they're set and their lifetime. On Thu, 2005-09-15 at 10:10 +0100, Alex Zbyslaw wrote: > Dave Webster wrote: > > >When I first installed FreeBSD I was able to run "halt" and "reboot" as > >su without the full /sbin/reboot command. After adding a new path to > >PATH, I've been unable to run these commands without specifying the full > >path. > >[...] > >Here is the output of echo $PATH: > >/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin: > >/usr/X11R6/bin:/home/Dave/bin:/usr/home/Dave/apache-forrest-0.7/bin > > > >My question is with /sbin in the path why do I have to > >specify /sbin/reboot, /sbin/kldstat etc.? Could this be causing my make > >install to fail? How can /sbin be in the path and still require a full > >path declaration for it's commands to work. > > > > > The short answer to your question is that if /sbin really were in your > path you would be able to run programs from it, therefore /sbin is *not* > in your path. (Since you can run commands from /sbin with full path > names it can't be file permissions or deleted programs). Either that or > something else on you path is somehow messing up your shell big-time, > but that seems less likely. > > You say that the problems started after you changed you path (I assume > in your .profile or whatever). So, quite simply, you must have made > some kind of mistake. I would suggest going back to the file you edited > and starting again. Comment out the PATH specification and add things > back one at a time. Assuming a /bin/sh or derivative, you can re-load > your file with > . filename > > (for csh derivatives, use "source filename"). > > After each change you make, source the changes and see if you can run > some innocuous program from /sbin such as kldstat. > > --Alex >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1126839813.1303.2.camel>