Reset/unset/change read-only $PATH

Caporegime
Joined
18 Oct 2002
Posts
29,493
Location
Back in East London
er, yeah.. the admins for one of our clients decided in their infinite wisdom to issue the PATH variable as read only, and to restrict it to /usr/sbin.. EEJITS.

So I need to change that.. but how?
Code:
# set foo=$PATH; unset PATH; export PATH=$foo:/usr/bin
ksh: PATH variable is read only
ksh: PATH variable is read only
:|

help, please?
 
We got around it by fixing the app to use full path names (which we probably should have it doing anyway to avoid ambiguity etc.)

We tried changing .profile and .kshrc (some id's use ksh, as in example post) but didn't get anywhere with it.. the admin himself didn't know what to do.. (:rolleyes: )

Will bear in mind that we need to restart bash/ksh/<flavor of shell> for the future :)
 
Back
Top Bottom