- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- su - strange behaviour
Operating System - HP-UX
1748052
Members
5221
Online
108758
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО09-13-2010 04:58 AM
тАО09-13-2010 04:58 AM
su - strange behaviour
Hi.
On my development server (ia64 hp-ux 11.31) su has suddenly started behaving quite strangely. Any scripts started with the -c option are losing the TZ environment variable. It appears that /etc/profile is not being run. Any suggestion as to what could be causing this?
In order to test this I have enabled SU_KEEP_ENV_VARS=HOME,SHLIB_PATH,TZ
in /etc/default/security but whether this is set or not seems to make no difference.
Thanks in advance.
Andrew Y
On my development server (ia64 hp-ux 11.31) su has suddenly started behaving quite strangely. Any scripts started with the -c option are losing the TZ environment variable. It appears that /etc/profile is not being run. Any suggestion as to what could be causing this?
In order to test this I have enabled SU_KEEP_ENV_VARS=HOME,SHLIB_PATH,TZ
in /etc/default/security but whether this is set or not seems to make no difference.
Thanks in advance.
Andrew Y
Si hoc legere scis, nimis eruditionis habes
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2010 05:03 AM
тАО09-13-2010 05:03 AM
Re: su - strange behaviour
"su" or "su -"?
Pete
Pete
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2010 05:33 AM
тАО09-13-2010 05:33 AM
Re: su - strange behaviour
Oops. Sorry.
su - myuser -c command
As listed below:
root@dev01[/root] #su - jss_test -c 'echo $TZ'
root@dev01[/root] #su jss_test -c 'echo $TZ'
SAST-2
root@dev01[/root] #su jss_test 'echo $TZ'
bash: echo $TZ: No such file or directory
root@dev01[/root] #su - jss_test
Bad planning on your part does not constitute a disaster on someone else's part.
/home/jss_test] echo $TZ
SAST-2
/home/jss_test] exit
logout
root@dev01[/root] #su jss_test
root@dev01[/root] #echo $TZ
SAST-2
su - myuser -c command
As listed below:
root@dev01[/root] #su - jss_test -c 'echo $TZ'
root@dev01[/root] #su jss_test -c 'echo $TZ'
SAST-2
root@dev01[/root] #su jss_test 'echo $TZ'
bash: echo $TZ: No such file or directory
root@dev01[/root] #su - jss_test
Bad planning on your part does not constitute a disaster on someone else's part.
/home/jss_test] echo $TZ
SAST-2
/home/jss_test] exit
logout
root@dev01[/root] #su jss_test
root@dev01[/root] #echo $TZ
SAST-2
Si hoc legere scis, nimis eruditionis habes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2010 05:43 AM
тАО09-13-2010 05:43 AM
Re: su - strange behaviour
I have no idea whether the bash shell is supposed to execute any profile/login scripts on login or not - have you tried this with a different shell?
Pete
Pete
Pete
Pete
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP