OpenSSH and user environment: Maybe not initialized correctly

Corinna Vinschen
Wed Sep 26 16:52:00 GMT 2007

On Sep 26 18:32, Frank wrote:
> >BTW, I am assuming that you're using 'whoami' from Windows on both of these
> >machines.  If not, then we know why you see the difference reported by 
> >these machines. ;-)
> on FI-WIN:     which whoami                 => /usr/bin/whoami
> on  AMD64:     ssh amd64 which whoami       => 
> /cygdrive/c/WINDOWS/system32/whoami
> on SMITHFIELD: ssh smithfield which whoami  => /usr/bin/whoami
> And I did one additional test:
>   ssh amd64 whoami            => amd64\sshd_server
>   ssh amd64 /usr/bin/whoami   => illenseer

Using pubkey authentication, the user name Cygwin sees is not the user
name Windows sees.  This is a problem of how pubkey authentication is
achieved, and in which logon session the processes are running.  The
strange Windows behaviour is a long-standing bug (present in NT 4
already), IMHO, which never got fixed (still present in Vista).  This
has been discussed many many times on this list.  Please search the
mailing list archives.

If you want Windows having the same idea of the user name as Cygwin, you
must either use password authentication, or you can take the risk using
the Cygwin developer snapshots and install the cyglsa DLL.  There's a
/usr/bin/cyglsa-config script which helps you to install it.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list