- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- scripts loosing the environment
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2008 06:42 AM
тАО04-16-2008 06:42 AM
scripts loosing the environment
We have several boxes mostly(11.11) where the helpdesk users see a menu when they log in.
The main scriptA check the user, exports the variables etc. This calls another scriptB which displays the menu. Script B then calls whichever script is needed depending upon the menu selection.
On a new machine however (11.23) when scriptB calls the final script the last script has lost the variables.
I have an echo at each point in the scripts the variables are set correctly in Script A and Script B, but get lost at the 3rd level
What is happeneing?
Regards
Mark
- Tags:
- environment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2008 06:59 AM
тАО04-16-2008 06:59 AM
Re: scripts loosing the environment
wrong with it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2008 07:11 AM
тАО04-16-2008 07:11 AM
Re: scripts loosing the environment
So, was the new machine established with an identical configuration as far as scripts, directories, permissions and ownerships?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2008 07:53 AM
тАО04-16-2008 07:53 AM
Re: scripts loosing the environment
The script works fine on other machines thanks.... :-/ I was wondering whether something in 11.23 only carries variables down so many new shells are something silly like that.
James
Yes the scripts / directories are the same.
Regards
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2008 08:09 AM
тАО04-16-2008 08:09 AM
Re: scripts loosing the environment
can you post an extract from your script so that we get a clearer picture?
revert!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2008 08:18 AM
тАО04-16-2008 08:18 AM
Re: scripts loosing the environment
> I was wondering whether something in 11.23 only carries variables down so many new shells are something silly like that.
I don't think that this has anything to due intrinsically with 11.11 vs. 11.23, but rather something with configuration.
> Yes the scripts / directories are the same.
Same permissions and ownerships? Same permissions and ownerships of parent directories (all the way up)?
> On a new machine however (11.23) when scriptB calls the final script the last script has lost the variables.
Does scriptB export what the final script will need?
Do you launch the menu script from a '.profile' or do you define it as the shell program in '/etc/passwd'? Is this done the same on all systems?
Lastly, if you a performing any 'su' commands, compare your '/etc/default/security' settings on your servers. In particular, look at settings like 'SU_KEEP_ENV_VARS', 'SU_ROOT_GROUP' and 'SU_DEFAULT_PATH'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2008 08:31 AM
тАО04-16-2008 08:31 AM
Re: scripts loosing the environment
This is hashed on the box that doesnt work
# Force su to propagate specified unsafe
# environment variables.
# SU_KEEP_ENV_VARS=HOME,SHLIB_PATH
ill have a check around the working boxes.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2008 08:37 AM
тАО04-16-2008 08:37 AM
Re: scripts loosing the environment
the final script is kicked off via sudo though so I think we are along the right lines.
- Tags:
- sudo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2008 08:49 AM
тАО04-16-2008 08:49 AM
Re: scripts loosing the environment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2008 09:29 AM
тАО04-16-2008 09:29 AM
Re: scripts loosing the environment
This line was missing in the sudoers
Defaults env_keep+="*"
Thanks