Bug 111579

Summary: OpenSSH server coverts uppercase username to lowercase during public key lookup
Product: [Retired] Red Hat Linux Reporter: Jack Perdue <ss>
Component: opensshAssignee: Tomas Mraz <tmraz>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: mitr
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-04 16:19:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jack Perdue 2003-12-05 18:14:49 UTC
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 16:19:28 UTC
This is fixed in the current releases.