delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/09/29/18:44:10

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Message-ID: <39D51B29.ECC295B@cygnus.com>
Date: Sat, 30 Sep 2000 00:43:53 +0200
From: Corinna Vinschen <vinschen AT cygnus DOT com>
Reply-To: cygdev <cygwin-developers AT sources DOT redhat DOT com>
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.14-SMP i686)
X-Accept-Language: de, en
MIME-Version: 1.0
To: cygdev <cygwin-developers AT sources DOT redhat DOT com>
Subject: Re: seteuid ?
References: <20000929222753 DOT 1859 DOT qmail AT web109 DOT yahoomail DOT com>

Earnie Boyd wrote:
> I understand and I'll take a look at your documentation.  In my particular
> instance not changing the NT user context was what needed to happen.  It did
> change the emulated UNIX user context so that the Cygwin functions reported
> that I was root.

But you don't need to `su' to get that. You can simply _be_ root in
terms of POSIX. For example your NT domain\username is "FOO\earnie",
you are member of Administrators (SID: S-1-5-32-544) and your SID is
S-1-5-21-12345678-56789012-34567890-1002.

If you are using "ntsec" you can set your /etc/passwd entry that way:

root::0:0:U-FOO\earnie,S-1-5-21-12345678-56789012-34567890-1002:/home/root:/bin/bash

and in /etc/group:

root:S-1-5-32-544:0:

and voila, your Cygwin uid is 0 and gid is 0 as well and all POSIX tools
recognize you as `root', member of group `root'.

> BTW, su doesn't ask for a password if the password field from getpwent() is
> NULL.

Yes, you're right. su acts as in UNIX. As I mentioned in the related
thread in the cygwin mailing list su lacks _real_ porting.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                        mailto:cygwin AT sources DOT redhat DOT com
Red Hat, Inc.
mailto:vinschen AT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019