- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: environment variable logname
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
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
тАО11-10-2005 08:34 PM
тАО11-10-2005 08:34 PM
environment variable logname
at the time of login, i am unable to find the environment variable "logname".
i am getting fallowing error
logname: could not get login name
and also i want to know where all these environment variable are stored.
thanks and regards,
sukumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 08:45 PM
тАО11-10-2005 08:45 PM
Re: environment variable logname
To find environment variable list then,
# env
will give it.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 08:46 PM
тАО11-10-2005 08:46 PM
Re: environment variable logname
May be that file is corrected. Create anew one and check. (Back up old one, in case required)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 08:47 PM
тАО11-10-2005 08:47 PM
Re: environment variable logname
find the binary by typing
whereis logname
and you will get
/usr/bin/logname
the profiles are executed while you logging in and within the profiles are some commands to set various variables.
try
man logname
for more information.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 08:49 PM
тАО11-10-2005 08:49 PM
Re: environment variable logname
There is no variable called logname in my login path also!!!!!
That means u have customized the /etc/profile or /$home/profile file to add an entry called logname. The command assigned to that variable is not working properly.
If u r getting this error for all users check the /etc/profile file and search for the string logname.
If u r getting this error only for ur loging name then open /home/
Most probably the problem will come for the variable PS1 in ur profile file. Proper command sustitution may not have done for that variable.
Regards
CS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 08:55 PM
тАО11-10-2005 08:55 PM
Re: environment variable logname
# logname
Is it working?
# ls -l /usr/bin/logname
-r-xr-xr-x 1 bin bin 12288 Nov 14 2000 /usr/bin/logname
May be you can get logname information as,
# who -mu | awk '{ print $1 }'
Or else,
write c coding to get logname or copy the binary from other hp-ux machine with same version.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 09:25 PM
тАО11-10-2005 09:25 PM
Re: environment variable logname
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2005 11:08 PM
тАО11-10-2005 11:08 PM
Re: environment variable logname
Check this doc for more info.
Title: How to clear corrupted utmp/utmpx files
Document ID: KBRC00008608
Europe
http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000080000500
US
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000080000500
Regards,
Robert-Jan