Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Reply-To: Cygwin List Message-Id: <6.2.1.2.0.20050713103256.09ae06c0@pop.prospeed.net> Date: Wed, 13 Jul 2005 11:05:08 -0400 To: , From: Larry Hall Subject: RE: ssh ceased to work after recreation of /etc/passwd In-Reply-To: <25F7D2213F14794A8767B88203EA2BC9240CBB@mucse201.eu.infineo n.com> References: <25F7D2213F14794A8767B88203EA2BC9240CBB AT mucse201 DOT eu DOT infineon DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 01:46 AM 7/13/2005, you wrote: >> >> 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 ~ >> >> Yep. > >Incidentally, this does not work for many files. I get the error message > > chown: changing ownership of ....: Permission denied > >This seems to be related to another a problem I am discussing here in >the thread >with subject line "chmod suddenly ceased to work on old files - NEW >FINDINGS". >chown seems to fail exactly for those files where I also have no >permission to >do a chmod. Yeah, that's certainly going to be a problem. You need to fix this before you'll have much luck with permissions in general. Maybe you just need to use Windows to take ownership of all these files. >> >> >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 >> >> And /cygdrive/h isn't your home directory as far as Cygwin is >> concerned? > >It is, but for historical reasons, id_rsa is under /cygdrive/c/.ssh and >I always pass the correct id_rsa via the -i flag of ssh. OK, that's fine then. Permissions need change there as we discussed. >> cygrunsrv -I sshd_debug -d "CYGWIN sshd debug" -p >> /usr/sbin/sshd -a -D -d -d -d > >I don't have a sshd on my machine. I use Windows only as ssh client, in >order to >access some Unix hosts. > >As I have no root rights on these hosts, it will be difficult to run ssh >in >debug mode there. OK, yeah yeah. I remember that now. I forgot that this was across platforms for the server. >So what I did is to manually edit /etc/passwd and set my user id back to >400. >Then I opened a new cygwin shell and, voila, ssh works again. > >Now the question is: What possible damage to my system could I have >introduced by manually changing the uid for my account in /etc/passwd? >After all, I'm always a bit reluctant to hack around in my passwd >file.... I expect you won't want to keep it this way but doing this for now is fine. It just means the POSIX UID that Cygwin knows you as isn't the same as Windows. This will mean that POSIX permissions that Cygwin creates on new files will be 400 instead of that of your domain user, so there may be more files to "fix" once your general permission issue is resolved. But I expect that's not a problem for you. The only thing you really don't want to edit in the passwd file is the Windows SUID, after the POSIX guid field. The rest is fair game, though I temper that comment by saying that one shouldn't just start editing all these fields for fun (which I know is not the case for you). -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- 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/