OpenSSH and user environment: Maybe not initialized correctly

Larry Hall (Cygwin) reply-to-list-only-lh@cygwin.com
Wed Sep 26 22:05:00 GMT 2007


Frank wrote:
>> I do see that FI-WIN and AMD64 don't have '/bin/sh' but
>> I don't think that's significant in your case (though you should 
>> reinstall
>> the 'bash' package to fix this).
> There is a "sh". See:
> $ ll /bin/sh
> lrwxrwxrwx 1 illenseer None 8 Nov 10  2006 /bin/sh -> bash.exe


Ah.  Well that is wrong.  '/bin/sh' should be a copy of '/bin/bash'.
I'd still recommend reinstalling the bash package to see if that creates
the proper '/bin/sh'.


>> I'm actually surprised that you get AMD to report your user name with
>> pubkey authentication.
> We maybe do misunderstand (or I do...):
> On amd64 I do NOT get the correct user name. (And also my MPIEXEC uses the
> wrong user name...)


My bad.  I had this reversed.


>> I'm not aware of anything in the current Cygwin
>> release that would allow one to authenticate with Windows using pubkey
>> authentication, which is why I suggested password authentication as an
>> alternative (I know it's hardly the same thing).
> Unfortunately I cannot switch to interactive password authentication.
> So that is not a workarund...   :-(


Yeah, sure.  I understand.  I expected so much.


>> You might find
>> comparing debugging output from the server side from both machines on
>> login to be enlightening.  Other alternatives I can think of is
>> authenticating "illenseer" (via 'net use' or some other mechanism of
>> your choosing) when you connect with 'ssh' or moving to a snapshot to
>> take advantages of improvements there.  You can also try forcing
>> 'ssh-host-config' to create the 'sshd_server' on your XP box and
>> use that user instead to run 'ssd' there.  Maybe whatever magic you're
>> experiencing on AMD64 will transfer to SMITHFIELD.
> Can you explain more detailed what you are thinking of, please? - I do
> not quite get your point or yur ideas/suggestions...


Never mind.  You've clarified for me below why you saw what you saw.


>> Please let us know if you find something here that explains the different
>> behavior you see on these two machines.
> I will dig around if time permitts and if I find something I will inform 
> you.
> 
>> 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


Ah-ha!  Well that explains the different results then.  There is no
magic going on here.  You are the user that runs 'sshd' then, as
expected, as far as Windows is concerned.  Corinna's response is all
you need.


-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list