- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- logname: could not get login name
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
05-19-2003 11:50 PM
05-19-2003 11:50 PM
logname: could not get login name
$ logname
logname: could not get login name
but if I do:
$ echo $LOGNAME
mgatt
I get my logname...
How can I fix the problem?
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 12:38 AM
05-20-2003 12:38 AM
Re: logname: could not get login name
Do
tty
result is something like
/dev/ttyp1
name is ttyp1
Then
ll -i /dev/ttyp1 /dev/*/ttyp1
211202 crw--w---- 2 steves tty 17 0x000001 May 20 10:38 /dev/pty/ttyp1
211202 crw--w---- 2 steves tty 17 0x000001 May 20 10:38 /dev/ttyp1
If the inode numbers do not match then you need to remake your special files
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 12:44 AM
05-20-2003 12:44 AM
Re: logname: could not get login name
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 12:49 AM
05-20-2003 12:49 AM
Re: logname: could not get login name
if you execute
# who -u
is mgatt then currently logged on?
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 05:01 AM
05-20-2003 05:01 AM
Re: logname: could not get login name
After adding the latest Quality Pak bundle for 11.0 (March 2003), I noticed that logname started failing for users connected via ssh.
Tracing the logname command, it appears that the updated binary adds calls to getsid(PID), which fail with EPERM or ESRCH errors. This causes logname to fail with the above error message.
whoami will return your effective username.
who am i | awk '{print $1}'
will return your real username (as determined from utmp).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 05:07 AM
05-20-2003 05:07 AM
Re: logname: could not get login name
Regards,
RZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2003 02:48 PM
07-10-2003 02:48 PM
Re: logname: could not get login name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2003 03:08 PM
07-10-2003 03:08 PM
Re: logname: could not get login name
Thanks,
Brian