public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Maayan Apelboim <Maayan.Apelboim@clarizen.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: can't access remote shares when using ssh with rsa key - passwd -R / set(e)uid / LogonUser is not working as expected
Date: Mon, 18 Mar 2019 13:53:00 -0000	[thread overview]
Message-ID: <AM6PR07MB53340B87E31FD56CC77B69D095470@AM6PR07MB5334.eurprd07.prod.outlook.com> (raw)
In-Reply-To: <20190314111127.GF3785@calimero.vinschen.de>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2587 bytes --]



If password auth or `passwd -R' auth is used you'll have the "4(INTERACTIVE)" group in your `id' output.  If S4ULogon is used you'll have the "2(NETWORK)" group in your `id' output.  This is one way to identify which logon method has been used.

	>>>>I always get 4(INTERACTIVE) - with password or with RSA (also on servers I didn't run passwd -R). Never got 2(NETWORK).



You don't need mkpasswd anymore.  Use `getent passwd' instead.
But... given you're using mkpasswd at all, I wonder if you still have /etc/passwd and/or /etc/group files.  If so, move them out of the way and restart your CYgwin processes.  They are not required and may even result in problems if they have been tweaked.
If you still have these files, removing them is the first thing to try.

	>>>>Yes, I still have passwd and group files. No special tweaks. They were set with mkpasswd -d & mkgroup -d and never been touched, but I'll check how to use getent and will update.



Other groups than NETWORK or INTERACTIVE don't matter, as explained above.  The only reasons I can think of that LogonUser doesn't work is that your username, domainname, or password are incorrect, or your account is disabled.  I never saw the call fail for any other reason.
For debugging, you would have to call the sshd service under strace.
That would give a hint.  For that you should change the sshd service call in the registry so that `/usr/sbin/sshd -D' is replaced with `/usr/bin/strace -o /tmp/sshd.trace /usr/sbin/sshd -d'.  Note the lowercase -d, which runs sshd in debug mode.  After the first logon, sshd will terminate itself automatically.  Afterwards you should send the /tmp/sshd.trace file here for inspection.  You can obfuscate sensitive info, but the gist of the file should stay intact.

	>>>> I was able to set sshd to run with debug (-d), but when adding the trace the service fails to start. 


Noticed another problem started only on the servers I ran passwd -R - the Cygwin terminal fails to start. The window opens and closes immediately. It didn't happen immediately after running the command. It started a few days later.
Servers have been rebooted during this time and I think it started after the reboot.
Think I might need to reinstall or upgrade and try your suggestions again.


Thanks for the tips. I will update when I have more info.
\0ТÒÐÐ¥\a&ö&ÆVÒ\a&W\x06÷'G3¢\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒ÷\a&ö&ÆV×2æ‡FÖÀФd\x15\x13¢\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöf\x17\x12ðФFö7VÖVçF\x17F–öã¢\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R\x06–æfó¢\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×\x06ÆPРÐ

      reply	other threads:[~2019-03-18 13:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AM6PR07MB5334CE88B67F5421BA671C43957B0@AM6PR07MB5334.eurprd07.prod.outlook.com>
2019-02-26 13:39 ` Maayan Apelboim
2019-02-26 15:33   ` Andrey Repin
2019-02-26 18:00     ` Houder
2019-02-27  1:17       ` Andrey Repin
2019-03-05  8:19         ` Maayan Apelboim
2019-03-05 19:27           ` Achim Gratz
2019-03-06 10:09             ` Maayan Apelboim
2019-03-06 12:28               ` Corinna Vinschen
2019-03-06 12:35                 ` Corinna Vinschen
2019-03-13  8:32                 ` Maayan Apelboim
2019-03-13  9:04                   ` Corinna Vinschen
2019-03-14 10:41                     ` Maayan Apelboim
2019-03-14 11:11                       ` Corinna Vinschen
2019-03-18 13:53                         ` Maayan Apelboim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR07MB53340B87E31FD56CC77B69D095470@AM6PR07MB5334.eurprd07.prod.outlook.com \
    --to=maayan.apelboim@clarizen.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).