This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: ssh ceased to work after recreation of /etc/passwd


> ># Before recreating /etc/passwd
> >$ id
> >uid=400(fischron) gid=401(mkpasswd)
> >groups=544(Administrators),545(Users),10513(mkgroup_l_d),401(
> mkpasswd)
> >
> ># After recreating /etc/passwd
> >$ id
> >uid=121833(fischron) gid=10513(mkgroup_l_d)
> >groups=544(Administrators),545(Users),10513(mkgroup_l_d)
> >
> >I guess that the change in uid causes ssh to not to recognize me
> >anymore.
> >
> >What's the best way to deal with this situation? Do I have 
> to recreate
> >id_rsa
> >and id_rsa.pub (and redistribute my public key to all sites I need
> >access to)?
> 
> 
> The above error occurs in ssh-keygen.c when getpwuid(getuid) 
> fails.  It 
> appears Cygwin still thinks of you as uid 400. Just try stopping all 
> Cygwin shells and services and then restarting (via 
> cygwin.bat).  

It was the other way around. I happened to have an "old" open shell
where id was still seen as 400, and *there* did ssh work; but when
I closed the window and opened a new shell, my numeric user id is
now 121833 and ssh does not work anymore at all.

> You'll
> probably find that you need to change the ownership of files 
> in your home
> directory (at least) to enable public key authentication again.

You mean: changing all files to owner 121833? That is: Should I do this:

  chown -R 121833 ~

But for the test of ssh, wouldn't it make more sense to chown the id_rsa
file instead? Note that on my system, it is not in ~/.ssh, but in
/cygdrive/h/.ssh. So I did a 

  chown 121833 /cygdrive/h/.ssh/id_rsa

but ssh still fails.


Ronald

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]