Bug 111579 - OpenSSH server coverts uppercase username to lowercase during public key lookup
OpenSSH server coverts uppercase username to lowercase during public key lookup
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: openssh (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-12-05 13:14 EST by Jack Perdue
Modified: 2007-04-18 12:59 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-04 11:19:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jack Perdue 2003-12-05 13:14:49 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
Gecko/20030225

Description of problem:

The SSH server converts the username to lowercase
when looking for the user's "authorized_keys" file.

Here's what the client show when debugging:

debug1: next auth method to try is publickey
debug1: try privkey: /home/ND80serv/.ssh/identity

here's what the server shows:

debug1: Starting up PAM with username "ND80serv"
debug1: userauth-request for user ND80serv service ssh-connection
method publickey
debug1: attempt 1 failures 1
debug1: test whether pkalg/pkblob are acceptable
debug1: PAM setting rhost to "cfenginesrv"
debug1: temporarily_use_uid: 666/666 (e=0/0)
debug1: trying public key file /home/nd80serv/.ssh/authorized_keys
debug1: restore_uid: 0/0
debug1: temporarily_use_uid: 666/666 (e=0/0)
debug1: trying public key file /home/nd80serv/.ssh/authorized_keys2
debug1: restore_uid: 0/0
Failed publickey for ND80serv from 207.44.246.63 port 36593 ssh2
debug1: userauth-request for user ND80serv service ssh-connection
method publickey
debug1: attempt 2 failures 2
debug1: test whether pkalg/pkblob are acceptable
debug1: temporarily_use_uid: 666/666 (e=0/0)
debug1: trying public key file /home/nd80serv/.ssh/authorized_keys
debug1: restore_uid: 0/0
debug1: temporarily_use_uid: 666/666 (e=0/0)
debug1: trying public key file /home/nd80serv/.ssh/authorized_keys2
debug1: restore_uid: 0/0
Failed publickey for ND80serv from 207.44.246.63 port 36593 ssh2

note that /home/ND80serv is being converted to /home/nd80serv on
the server side (this example is using the SSH client from RH7.3).

This could be related to:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=89677

The workaround is to create a symlink using lowercase
letters to the home directory containing the uppercase
letters.

e.g. ln -s /home/ND80serv /home/nd80serv



Version-Release number of selected component (if applicable):
openssh-server-3.5p1-11

How reproducible:
Always

Steps to Reproduce:
1. create a user account with upper case letters
2. use ssh-keygen to generate public key without a passphrase
3. copy id_dsa.pub to authorized_keys
4. as root, /usr/sbin/sshd -d -p 666
5. as the new user, ssh localhost -p 666

    

Actual Results:  public key authentication fails because the
authorized_keys
file can't be found (because the username was converted to lowercase)

Expected Results:  Login should succeed.

Additional info:

Again, this breaks interoperability with
other *NIXs... IRIX, Solaris and HP-UX have
no such requirement for only lowercase letters 
in the username.
Comment 1 Tomas Mraz 2005-02-04 11:19:28 EST
This is fixed in the current releases.

Note You need to log in before you can comment on or make changes to this bug.