Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all,
I am trying to port a custom application from a RHEL4 server to a RHEL6 server.
On the RHEL 4 server, if you run the command: "env". The person who set this up had custom environment variables set so the application could use them in the scripts.
I grabbed the environment variables. exported from the /etc/bashrc ran source and restarted the server and they now appear on the RHEL6 server.
Situation is the custom application I run, does not recognise these environment variables and I cannot locate them ANYWHERE on the RHEL4 box.
I have searched for hidden files, .bashrc, .bash_profile , /etc/bashrc, /etc/rc.local, files in /etc/skel for any export statements which define these variables on the RHEL4 system and cannot locate any.
My only thoughts are they are some how in the custom application code, and generated to the bash shell ?
Another place to check for custom variables is the application's startup script.
Also are you running this process as a daemon with its own application user, or manually?
Some more info would be good.
lsof /applic/bms/obj/menu
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
menu 8798 npilavid txt REG 8,2 364444 1613601 /applic/bms/obj/menu
menu 12972 npilavid txt REG 8,2 364444 1613601 /applic/bms/obj/menu
ls -l /applic/bms/obj/menu
-rwxr-xr-x 1 phil bms 364444 Sep 29 17:13 /applic/bms/obj/menu : looks to run as user phil and everyone has to be in the group bms to run it.
It loads up in there .bash_profile. There is no startup script or daemon for it.
# additional procedures for BMS users
#
if [ `id -gn` = "bms" ]
then
umask 0000
cd /applic/bms
case `id -un` in
phil)
return 0
;;
*)
exec menu
;;
esac
fi
looks like the env variables must be set by this binary....
The binary probably sets its own env for security. If it can't use them, it probably means the values are set in a cfg file somewhere. For super security, the cfg file could be encrypted with the key in the prog code.
Basically, save yourself some time and either ask the guy who wrote it or check the src.
You should have the src if it was written in-house.
If it wasn't written in-house, ask the company who supplied it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.