seteuid ?

Corinna Vinschen
Fri Sep 29 15:43:00 GMT 2000

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

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


and in /etc/group:


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

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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer              
Red Hat, Inc.

More information about the Cygwin-developers mailing list