Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

$PATH problem

 
   Linux (Home) -> Slackware RSS
Next:  Where can I get GLIBC_2.2.4 ?  
Author Message
Stuart

External


Since: Dec 02, 2003
Posts: 8



(Msg. 1) Posted: Mon Dec 15, 2003 1:44 pm
Post subject: $PATH problem
Archived from groups: alt>os>linux>slackware (more info?)

I have a user set up with the following as his path:

/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:
/opt/kde/bin:/usr/local/samba/bin:/opt/www/htdig/bin:
/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/qt-3.2.1/bin:
/usr/share/texmf/bin:

Root has the following as his path:

/usr/local/sbin:/usr/sbin:/sbin:/usr/local/samba/sbin:
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:
/opt/kde/bin:/usr/local/samba/bin:/opt/www/htdig/bin:
/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/qt-3.2.1/bin:
/usr/share/texmf/bin:

however when I log into kde as my user and using konsole do an su (or from
the console do an su) checking the path only gives me:

/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin

why is this, is this by design or am I missing something?
The following is an exctract from my /etc/profile file, this is where if I
need to add a path i add it to the default system path

# set the default system $PATH
PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:
/opt/kde/bin:/usr/local/samba/bin"
(the above line isn't wrapped in the file)

# For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in
# the $PATH. Some means of connection don't add these by default (sshd comes
# to mind).
if [ "`id -u`" = "0" ]; then
echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
if [ ! $? = 0 ]; then
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/samba/sbin:$PATH
fi
fi

Thanks for any help

Stuart
Back to top
Login to vote
Menno Duursma

External


Since: Nov 17, 2003
Posts: 107



(Msg. 2) Posted: Mon Dec 15, 2003 1:55 pm
Post subject: Re: $PATH problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 15 Dec 2003 13:44:39 +0000, Stuart wrote:

> I have a user set up with the following as his path:
>
> /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:

[...]

> however when I log into kde as my user and using konsole do an su (or from
> the console do an su) checking the path only gives me:
>
> /usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin

Try "su -" instead.

> why is this,

When useing "su" without the ``-'' you don't get a login shell (under the
new user). And as such /etc/profile isn't being sourced.

> is this by design

Yes.

> or am I missing something?

Yes. "man su"

> Thanks for any help

NP.

--
-Menno.
Back to top
Login to vote
Wong Kum Weng

External


Since: Aug 21, 2003
Posts: 29



(Msg. 3) Posted: Mon Dec 15, 2003 9:59 pm
Post subject: Re: $PATH problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Stuart wrote:
> I have a user set up with the following as his path:
>
> /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:
> /opt/kde/bin:/usr/local/samba/bin:/opt/www/htdig/bin:
> /usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/qt-3.2.1/bin:
> /usr/share/texmf/bin:
>
> Root has the following as his path:
>
> /usr/local/sbin:/usr/sbin:/sbin:/usr/local/samba/sbin:
> /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:
> /opt/kde/bin:/usr/local/samba/bin:/opt/www/htdig/bin:
> /usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/qt-3.2.1/bin:
> /usr/share/texmf/bin:
>
> however when I log into kde as my user and using konsole do an su (or from
> the console do an su) checking the path only gives me:
>
> /usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
>
> why is this, is this by design or am I missing something?
> The following is an exctract from my /etc/profile file, this is where if I
> need to add a path i add it to the default system path
>
> # set the default system $PATH
> PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:
> /opt/kde/bin:/usr/local/samba/bin"
> (the above line isn't wrapped in the file)
>
> # For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in
> # the $PATH. Some means of connection don't add these by default (sshd comes
> # to mind).
> if [ "`id -u`" = "0" ]; then
> echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
> if [ ! $? = 0 ]; then
> PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/samba/sbin:$PATH
> fi
> fi
>
> Thanks for any help
>
> Stuart
>

I hope you did not press the return key at the end of the line and did
you export the path?

Regards,
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Changing PATH - On the last version of Linux I was running one had to edit a file called ".bash_profile" in order to add to the path. I can find no such file on Slackwarear and so am wondering how to accomplish this? Thanks for any assistance. Regards Chris ...

PATH variable and slackware - I am using Slackware 4.0. I cannot follow how Slackware is inititalizing the PATH variable. I looked in /etc/profile, but the PATH there did not match echo $PATH and there is no .bash_profile and .bashrc in the root directory.

Path Environment Variable & MySQL startup on boot - I am current setting up MySQL and would like to confirm what I am doing before executing any commands. I have the following two tasks left to complete: 1) Add MySQL to the PATH environment variable. The installation manual states this is done with the....

Problem - I've just installed Slack 10 on a dual boot set-up, & when I uname on the new install drive, it says 2.4.20 instead of 2.4.26. The kernel there is 2.4.26. The new install drive is an ide drive & the other drive is a scsi.

Problem with mouse - Mouse works correctly under X.. ok.. but during the boot the system waits about 10 sec. when this string appears: mice: PS/2 mouse device common for all mice What's wrong? Tnx
       Linux (Home) -> Slackware All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
  Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact