public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: CSIH patch (Re: Unable to run sshd under a domain sshd_server 	account [SOLVED])
Date: Sun, 20 Jul 2008 12:26:00 -0000	[thread overview]
Message-ID: <20080720122754.GP5675@calimero.vinschen.de> (raw)
In-Reply-To: <488252B5.8000501@cwilson.fastmail.fm>

On Jul 19 16:46, Charles Wilson wrote:
> Corinna Vinschen wrote:
>
>> However, I sent a second patch in
>> http://cygwin.com/ml/cygwin/2008-06/msg00453.html
>> The Interactive Logon Right is also necessary for this account.
>
> I don't know why I missed that. I'll roll 0.1.6 soon.

Thanks.

>> What also doesn't work well is this:  In a domain I might want a
>> cyg_server domain account, rather than a local account on each
>> machine.  The reason is that the rights of the domain account can
>> be nicely controlled via group policy.  That won't work for local
>> accounts on the domain member machines.  Therefore, if a cyg_server
>> account exists in /etc/passwd, I think it should be used.
>
> I'm afraid I have no access to a domain account on which I can test this 
> sort of thing (I mean, I /do/ have a domain account at work, but I can't 
> experiment with adding new domain accounts, nor manipulate their 
> privileges.
> [...]
> I imagine you are suggesting that the following loop:
>
>       for username in cyg_server cron_server sshd_server
>       do
>         if net user "${username}" 1> /dev/null 2>&1
>         then
>           [ -z "${first_account}" ] && first_account="${username}"
>           accounts="${accounts}'${username}' "
>         fi
>       done
>
> Should be modified somehow, perhaps (UNTESTED):
>
>       for username in cyg_server cron_server sshd_server
>       do
>         if egrep "^${username}:" /etc/passwd 1>/dev/null 2>&1 ||
>            net user "${username}" 1> /dev/null 2>&1
>         then
>           [ -z "${first_account}" ] && first_account="${username}"
>           accounts="${accounts}'${username}' "
>         fi
>       done

Along these lines, yes.  I also think that using the cyg_server/
cron_server/sshd_server account should be preferred over SYSTEM on XP
and earlier systems, at least if they are domain member machines.  Maybe
simply like this:  The test should run on any OS, but if none of the
accounts exists, the fallback for XP and earlier is SYSTEM.  IIUC, that's
not quite what $csih_FORCE_PRIVILEGED_USER is for.  Yes?  No?

As for creating an account in a domain if it doesn't exists, that's
probably nothing which should be done in the script.  If this feature
is used, the domain admins should know what they are doing, I guess.

> However, note that at present there is no provision in csih to "decorate" 
> user names with domain information (e.g. username="MyDomain\cyg_server".  
> It /might/ work, if you manually set csih_PRIVILEGED_USERNAME that way, but 
> I haven't tested it -- and have no way to do so. It would be serendipitous 
> at best if that worked. But I'm not sure you really /need/ that -- if the 
> privileged domain user is in the active domain of the computer on which you 
> want to use that privileged account (e.g. to run sshd)...which I imagine is 
> the use case under consideration here...I don't think you really /need/ to 
> explicitly specify the domain.

That's not quite correct.  When specifying the user running a service,
you have to specify the full qualified user name.  If you just enter
the name w/o domain it fails with a "no such (local) account" sort of
message.

However, assuming the /etc/passwd entry for that user is correct, you
don't need to specify the domain because cygrunsrv translates the Cygwin
username to the Windows domain\username automatically.  So, using the
above egrep and using that user should be sufficient.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

  parent reply	other threads:[~2008-07-20 12:26 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-12 21:32 Unable to run sshd under a domain sshd_server account [SOLVED] 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.
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 [this message]
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=20080720122754.GP5675@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.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).