public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Schutter, Thomas A." <tschutter@proxix.com>
To: <cygwin@cygwin.com>
Subject: RE: Unable to run sshd under a domain sshd_server account [SOLVED]
Date: Tue, 13 May 2008 16:57:00 -0000	[thread overview]
Message-ID: <3B3EFBD49B94AD4DBB7B7097257A8046DD031A@FDSVAST06SXCH01.flooddata.net> (raw)
In-Reply-To: <20080513163756.GC18799@calimero.vinschen.de>

Corinna Vinschen wrote:
> On May 13 11:09, Schutter, Thomas A. wrote:
> > > -----Original Message-----
> > > On May 12 18:29, Igor Peshansky wrote:
> > > > On Mon, 12 May 2008, Schutter, Thomas A. wrote:
> > > > Yes -- Windows does not understand user impersonation and does
> not
> > > allow
> > > > real user switching.  So what sshd does is invoke processes with
> the
> > > > appropriate token privileges for the user it's impersonating,
> while
> > > > updating internal Cygwin data structures, but still running as
> > > > sshd_server.  So Cygwin sees the right user (in its internal
> state),
> > > but
> > > > Windows processes, of course, don't.
> > >
> > > That's not correct.  This problem cropped up on the list a lot
> > already.
> > > When not using password authentication, Cygwin has to create a
user
> > > token from scratch.  The resulting processes are running under a
> > normal
> > > user token with correctly set user and group ownership.
> >
> > Except that is not what I am seeing.  When I run "id" from a console
> > cygwin shell:
> >   $ id
> >   uid=18718(tschutter) gid=10513(Domain Users)
> > groups=544(Administrators),545(Users),10513(Domain
> > Users),18169(FDSV-GG-PrxBLD),22611(FDSV-GG-PrxPCAdmins)
> >
> > But when I run "id" from a ssh shell:
> >   $ id
> >   uid=18718(tschutter) gid=10513(Domain Users)
> > groups=545(Users),10513(Domain Users)
> >
> > So when I am using pubkey authentication, the user token is not a
> member
> > of the "Administrators", "FDSV-GG-PrxBLD", or "FDSV-GG-PrxPCAdmins"
> > groups.
> 
> That wasn't what I was talking about.  I was just referring to the
> assertion that Windows doesn't know about user impersonation or
> user switching.
> 
> As for your user token, Cygwin tries to get information about the user
> by asking the local machine what local and global groups the user is
> member in.  Some local groups are only in the user's group list,
> because
> one of the global grouyps is in turn member of a local group, which is
> probably the case for the Admin's group.  For some reason your local
> machine doesn't return any of the information about the global domain
> groups your user is member in.  Possible reasons are that retrieving
> the
> PDC for the user's domain fails, or that the PDC refuses to list the
> user's groups for some reason.  That's something you would have to
> debug
> in your local installation.

Ahh.  From my original email from a console cygwin shell:
  $ echo $USERDOMAIN
  FLOODDATA

But when I login via ssh:
  $ echo $USERDOMAIN
  FDSVBLD01SGRAPE

So when I login via ssh, the USERDOMAIN is set to the local machine
rather than the domain.  So I would suspect that the PDC is not even
being queried.

So to summarize, if sshd is run under the local sshd_server account,
then the USERDOMAIN for a ssh shell is set to the local machine.  But
if sshd is run under a domain account, then the USERDOMAIN for a ssh
shell is set to the domain.  This is then the root cause of most of
my issues.

So why is USERDOMAIN set incorrectly?

--
Tom Schutter
First American - Proxix Solutions
(512) 977-6822

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

  reply	other threads:[~2008-05-13 16:49 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-12 21:32 Schutter, Thomas A.
2008-05-12 22:32 ` Igor Peshansky
2008-05-12 23:20   ` Schutter, Thomas A.
2008-05-12 23:24     ` Igor Peshansky
2008-05-13  3:32       ` Igor Peshansky
2008-05-13 16:09       ` Schutter, Thomas A.
2008-05-13 16:10         ` Larry Hall (Cygwin)
2008-05-13 16:29           ` Schutter, Thomas A.
2008-05-13 16:38             ` Larry Hall (Cygwin)
2008-05-13 16:49               ` Schutter, Thomas A.
2008-05-13 17:35                 ` Larry Hall (Cygwin)
2008-05-13 17:59                   ` Schutter, Thomas A.
2008-05-13  6:45     ` Christopher Faylor
2008-05-13  7:59   ` Corinna Vinschen
2008-05-13 16:22     ` Schutter, Thomas A.
2008-05-13 16:42       ` Corinna Vinschen
2008-05-13 16:57         ` Schutter, Thomas A. [this message]
2008-05-13 17:07           ` Corinna Vinschen
2008-05-13 17:24             ` Schutter, Thomas A.
2008-05-14 11:48               ` Corinna Vinschen
2008-06-16 21:03       ` Corinna Vinschen
2008-06-16 21:27         ` CSIH patch (Re: Unable to run sshd under a domain sshd_server account [SOLVED]) Corinna Vinschen
2008-06-22 23:57           ` Corinna Vinschen
2008-07-19 16:52           ` Charles Wilson
2008-07-19 17:10             ` Corinna Vinschen
2008-07-19 20:47               ` Charles Wilson
2008-07-19 21:00                 ` Charles Wilson
2008-07-20 12:26                 ` Corinna Vinschen
2008-07-20 13:38                   ` Corinna Vinschen
2008-08-05  1:32                     ` Charles Wilson
2008-08-07  8:13                       ` Corinna Vinschen
2008-08-07 15:38                         ` Charles Wilson
2008-08-07 16:24                           ` Corinna Vinschen
2008-08-07 16:42                             ` Charles Wilson
2008-08-07 17:43                               ` Corinna Vinschen
2008-08-07 17:53                                 ` Charles Wilson
2008-08-08  2:20                                   ` csih-0.1.6 available for testing [Was: Re: CSIH patch (Re: Unable to run sshd ...)] Charles Wilson
2008-08-15 19:39                                     ` Charles Wilson
2008-08-15 19:59                                       ` Yaakov (Cygwin Ports)
2008-08-18 11:24                                       ` Corinna Vinschen
2008-08-18 12:36                                         ` Charles Wilson
2008-08-18 12:53                                           ` Corinna Vinschen
2008-08-18 13:14                                             ` Charles Wilson
2008-08-18 13:16                                               ` Corinna Vinschen
2008-08-18 18:04                                                 ` Charles Wilson
2008-08-18 13:33                                           ` Christopher Faylor
2008-08-18 14:12                                             ` Corinna Vinschen
2008-08-18 14:33                                               ` Christopher Faylor
2008-08-08  9:20                                   ` CSIH patch (Re: Unable to run sshd under a domain sshd_server account [SOLVED]) Corinna Vinschen

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=3B3EFBD49B94AD4DBB7B7097257A8046DD031A@FDSVAST06SXCH01.flooddata.net \
    --to=tschutter@proxix.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).