HP-UX – logname command is not working

by on November 18, 2005 · 1 comment· LAST UPDATED November 18, 2005

in

Asked by M. Sukumar

Q. When I logged into my server, I got these error
logname: could not get login name

I am not getting what is the problem for not executing these logname command in /etc/profile, and also I checked my /etc/utmp /etc/utpmx files are not corrupted. Skumar further tell us that he login over ssh, and he has tried the full path /usr/bin/logname, and permission are also good, but it is not working. Remaining commands like who , who am i , all are working properly. Further command 'echo $LOGNAME' giving him correct output.

A. Since files are /etc/utmp /etc/utpmx files are not corrupted, problem is basically related to sshd server. By setting UsePrivilegeSeparation from:

UsePrivilegeSeparation Yes

To

UsePrivilegeSeparation No

should fix the problem. Change the values in sshd_config file and restart the network. Please note that UsePrivilegeSeparation - specifies whether sshd separates privileges by creating an unprivileged child process to deal with incoming network traffic. After successful authentication, another process will be created that has the privilege of the authenticated user. The goal of privilege separation is to prevent privilege escalation by containing any corruption within the unprivileged processes. The default is “yes”. Privilege Separation should be always turned on for security. You should upgrade both sshd and HP-UX with up to date patches to solve this problem.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 1 comment… read it below or add one }

1 Anonymous November 25, 2005 at 6:09 pm

I had same problem thanks for you hints
fantastic post… a massive help :)

Reply

Leave a Comment

Previous post:

Next post: