Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] RHEL - modify system path with script in profile.d - only works for root not users



> From: discuss-bounces+blu=nedharvey.com at blu.org [mailto:discuss-
> bounces+blu=nedharvey.com at blu.org] On Behalf Of stephen goldman
> 
> Hello All,
>         Request assistance on modifying the system path .. on a REHL box.
> 
> The change works for root but not for any of the users???
> 
> 
> Host OS = 2.6.18-274.el5 #1 SMP Fri Jul 8 17:36:59 EDT 2011 x86_64 x86_64
> x86_64 GNU/Linux
> 
> Based on this :
> 
> /etc/profile - and link below creating a script in /etc/profile.d
> 
> 
> http://serverfault.com/questions/102932/adding-a-directory-to-path-in-
> centosIt's
> 
> 
> 
> 
> Created script in /etc/profile.d - addusers:   to add the path..
> 
> host profile.d]# vi addpath.sh
> export PATH=$PATH:/usr/local/sratoolkit.2.1.7-centos_linux64
> 
> 
> 
> Permissions of script.
> 
> drwxr-xr-x   2 root root      4096 Nov 19 11:45 .
> drwxr-xr-x 100 root root     12288 Nov 18 17:49 ..
> -rwxr-xr-x   1 root saeijlab    61 Nov 19 11:45 addpath.sh
> 
> This works for root but not for other users .. Why
> 
> Open to ideas
> 
> I am testing as a standard user and it does not work.

What is your shell?  If you want csh to behave this way, you have to create
addpath.csh in there too.

Why don't you stick a couple of echo statements into that script too.  So
you can see if the script is ever getting called.

Check to see if selinux is running by running sestatus.  If it is enabled,
temporarily disable it with setenforce 0 temporarily, see if it works, and
then setenforce 1

I wonder if you have something else in your login scripts, such as ~/.bashrc
which clobbers this setting later.

How are you testing it?  You know, the scripts that get processed are
different based on whether it's a login shell (that gets launched when you
ssh into the machine) or just another spawned shell (like if you just type
"bash" on the command prompt or something).  So make sure you're testing it
the same way each time.





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org