- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: logname issue
Operating System - HP-UX
1753886
Members
7448
Online
108809
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
тАО04-14-2008 05:27 AM
тАО04-14-2008 05:27 AM
logname issue
I have a strnage issue with "logname" that doesn't seem to be reolveable by any of the previously posted solutions.
Our developers sudo su - and then at some stage they ssh to another development server. Through all of this, their "logname" needs to remain their username - for various loggin reasons.
On the initial server, this is not a problem, the logname command and $LOGNAME variable are always correct.
But when they ssh to the other server, one of two things happens:
1. logname: could not get login name (the logname is run from the .profile of the user)
2. It works, but the logname is the name of the user we ssh'd from (app_username), not the user's username.
It all seems very strange to me.
We're running HPUX 11.23 on Itanium servers.
Our developers sudo su -
On the initial server, this is not a problem, the logname command and $LOGNAME variable are always correct.
But when they ssh to the other server, one of two things happens:
1. logname: could not get login name (the logname is run from the .profile of the user)
2. It works, but the logname is the name of the user we ssh'd from (app_username), not the user's username.
It all seems very strange to me.
We're running HPUX 11.23 on Itanium servers.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2008 06:36 AM
тАО04-14-2008 06:36 AM
Re: logname issue
"But when they ssh to the other server, one of two things happens:
1. logname: could not get login name (the logname is run from the .profile of the user)
2. It works, but the logname is the name of the user we ssh'd from (app_username), not the user's username."
so...they are still su'd to "app_username" when this occurs? If so, a simple "ssh new_server" is going to log you in there w/ the credentials of "app_username", so I would expect logname / $LOGNAME on the new server to a) work and b) return "app_username". Any connection to there real login id was lost with the ssh to the new target.
you could ssh to the new server with there original login by doing something like:
sss `logname`@new_server. At that point, it will log them in to the "new" server using their own id. They would then have to "su" again to "app_username". Then logname / $LOGNAME on the new server should be correct. Of course, that means the developers need accounts on the "new server" as well.
1. logname: could not get login name (the logname is run from the .profile of the user)
2. It works, but the logname is the name of the user we ssh'd from (app_username), not the user's username."
so...they are still su'd to "app_username" when this occurs? If so, a simple "ssh new_server" is going to log you in there w/ the credentials of "app_username", so I would expect logname / $LOGNAME on the new server to a) work and b) return "app_username". Any connection to there real login id was lost with the ssh to the new target.
you could ssh to the new server with there original login by doing something like:
sss `logname`@new_server. At that point, it will log them in to the "new" server using their own id. They would then have to "su" again to "app_username". Then logname / $LOGNAME on the new server should be correct. Of course, that means the developers need accounts on the "new server" as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2008 07:09 AM
тАО04-14-2008 07:09 AM
Re: logname issue
You are 100% correct, but that just makes too much sense.
I thought that was the case myself, but I am assured by the lead developer - who has root access to both servers *SHUDDER* - that this used to work.
I thought that was the case myself, but I am assured by the lead developer - who has root access to both servers *SHUDDER* - that this used to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2008 08:27 AM
тАО04-14-2008 08:27 AM
Re: logname issue
I can't think of any case where it wouldn't work as I described.
"assured that this used to work"...over ssh or some other method, like rlogin (although AFAIK thats going to use the "current" id as well)?
And since the "lead developer" has root access, the next question (to them) would be "So what did YOU break and how do YOU propose to fix it" :-)
"assured that this used to work"...over ssh or some other method, like rlogin (although AFAIK thats going to use the "current" id as well)?
And since the "lead developer" has root access, the next question (to them) would be "So what did YOU break and how do YOU propose to fix it" :-)
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