- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: su - does not change $SHELL
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
Forums
Discussions
Discussions
Discussions
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
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
03-31-2006 12:56 PM
03-31-2006 12:56 PM
marktest:HnpDwN/t6Jhjk:584:20:Mark Test,,,:/home/marktest:/usr/bin/csh
When I log directly intp the account with ssh, the value of $SHELL is:
SHELL=/usr/bin/csh
When I su - marktest from root, the $SHELL is:
SHELL=/sbin/sh
This is not happening on any other systems. For some reason, issuing a simple su -
I even removed /etc/profile, /etc/csh.login and ALL the hidden files from the users $HOME directory (i.e. .profile, .login, .cshrc)
I need to get the $SHELL environment variable to display the correct shell because a product we are using makes a check for this on it's startup script. Also, it appears from the prompt and the fact that the export command does not work, that I am truely in the csh shell even when I use su - marktest. So it just looks like an environment variable issue. Any ideas what could be setting it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2006 01:21 PM
03-31-2006 01:21 PM
SolutionYou don't say what release you are running. If this is 11.11, there is a defect in 'su' that is repaired with patch PHCO_33568.
If you lack the patch, I suggest you download it from the ITRC Patch Database and install it. No reboot is required.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2006 01:26 PM
03-31-2006 01:26 PM
Re: su - does not change $SHELL
root@cdtsv1:/uname -a
HP-UX cdtsv1 B.11.23 U ia64 1970548579 unlimited-user license
Does not look like this patch applies to 11.23. So I wonder if it was actually fixed in 11.23 or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2006 01:27 PM
03-31-2006 01:27 PM
Re: su - does not change $SHELL
Yes, you are running 11.23. Use PHCO_33567, instead.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2006 01:57 PM
03-31-2006 01:57 PM