public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* SYSTEM Problem
@ 2009-02-07  9:45 Jaspreet Singh
  2009-02-09 11:48 ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: Jaspreet Singh @ 2009-02-07  9:45 UTC (permalink / raw)
  To: cygwin

hi, i just created a new user 'test' in windows and in /etc/passwd, in
 windows 'test' is a member of 'Users' group. Now when i run /bin/bash
as SYSTEM User it 'su' to any user in there with valid shell, but it is
not doing 'su' to User 'test'.

So, i tried 'Runas' running CMD as SYSTEM user of windows its still not
 login in to bash as User 'test'. It saying 'Permission Denied'.

I just wanted to know that as SYSTEM has rights to 'su' to any user why
 its not 'su' to user that i just created. 


      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SYSTEM Problem
  2009-02-07  9:45 SYSTEM Problem Jaspreet Singh
@ 2009-02-09 11:48 ` Corinna Vinschen
  2009-02-09 12:17   ` Jaspreet Singh
  0 siblings, 1 reply; 7+ messages in thread
From: Corinna Vinschen @ 2009-02-09 11:48 UTC (permalink / raw)
  To: cygwin

On Feb  7 15:15, Jaspreet Singh wrote:
> hi, i just created a new user 'test' in windows and in /etc/passwd, in
>  windows 'test' is a member of 'Users' group. Now when i run /bin/bash
> as SYSTEM User it 'su' to any user in there with valid shell, but it is
> not doing 'su' to User 'test'.
> 
> So, i tried 'Runas' running CMD as SYSTEM user of windows its still not
>  login in to bash as User 'test'. It saying 'Permission Denied'.
> 
> I just wanted to know that as SYSTEM has rights to 'su' to any user why
>  its not 'su' to user that i just created. 

If the process running as SYSTEM is started as or from a Windows service,
the the user token of the process has not the "create a token object"
right starting with Windows Server 2003.  This disallows switching
the user context if no password for the new user is given.


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/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SYSTEM Problem
  2009-02-09 11:48 ` Corinna Vinschen
@ 2009-02-09 12:17   ` Jaspreet Singh
  2009-02-09 17:21     ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: Jaspreet Singh @ 2009-02-09 12:17 UTC (permalink / raw)
  To: cygwin

> > hi, i just created a new user 'test' in
> windows and in /etc/passwd, in
> >  windows 'test' is a member of 'Users'
> group. Now when i run /bin/bash
> > as SYSTEM User it 'su' to any user in there
> with valid shell, but it is
> > not doing 'su' to User 'test'.
> > 
> > So, i tried 'Runas' running CMD as SYSTEM user
> of windows its still not
> >  login in to bash as User 'test'. It saying
> 'Permission Denied'.
> > 
> > I just wanted to know that as SYSTEM has rights to
> 'su' to any user why
> >  its not 'su' to user that i just created. 
> 
> If the process running as SYSTEM is started as or from a
> Windows service,
> the the user token of the process has not the "create
> a token object"
> right starting with Windows Server 2003.  This disallows
> switching
> the user context if no password for the new user is given.

  Yes you are right, so do you have any sugestion/ideas how to do
  that on Windows XP SP2/NTFS/CYGWIN1.7. Does cyglsa in any way
  can help

  SYSTEM is only able to su to that users
  that are within its primary group thats Administrators/544
  so, what i did was i made test user member of SYSTEM/18 group
  thats how SYSTEM was able to su to test user. but thats not a
  good idea to make a regular user part of SYSTEM group.

  code to run as SYSTEM is, if you want to try it and can get any
  solution to this. 

  cygrunsrv -I runassys -p C:/WINDOWS/system32/cmd.exe -a "/C start
  CMD.EXE /K C:\cygwin1.7\bin\bash.exe --login -i" -i --nohide

> 
> 
> Corinna


      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SYSTEM Problem
  2009-02-09 12:17   ` Jaspreet Singh
@ 2009-02-09 17:21     ` Corinna Vinschen
  0 siblings, 0 replies; 7+ messages in thread
From: Corinna Vinschen @ 2009-02-09 17:21 UTC (permalink / raw)
  To: cygwin

On Feb  9 17:47, Jaspreet Singh wrote:
> > > hi, i just created a new user 'test' in
> > windows and in /etc/passwd, in
> > >  windows 'test' is a member of 'Users'
> > group. Now when i run /bin/bash
> > > as SYSTEM User it 'su' to any user in there
> > with valid shell, but it is
> > > not doing 'su' to User 'test'.
> > > 
> > > So, i tried 'Runas' running CMD as SYSTEM user
> > of windows its still not
> > >  login in to bash as User 'test'. It saying
> > 'Permission Denied'.
> > > 
> > > I just wanted to know that as SYSTEM has rights to
> > 'su' to any user why
> > >  its not 'su' to user that i just created. 
> > 
> > If the process running as SYSTEM is started as or from a
> > Windows service,
> > the the user token of the process has not the "create
> > a token object"
> > right starting with Windows Server 2003.  This disallows
> > switching
> > the user context if no password for the new user is given.
> 
>   Yes you are right, so do you have any sugestion/ideas how to do
>   that on Windows XP SP2/NTFS/CYGWIN1.7. Does cyglsa in any way
>   can help

Yes, as well as storing the password in the registry.
See http://cygwin.com/1.7/cygwin-ug-net/ntsec.html#ntsec-setuid-overview


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/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SYSTEM() problem
       [not found] <5D6C51A4D866144C852423F6B2779A140319F4@sun01bxgxs.internal.gxs.com>
@ 2003-02-10 15:25 ` Max Bowsher
  0 siblings, 0 replies; 7+ messages in thread
From: Max Bowsher @ 2003-02-10 15:25 UTC (permalink / raw)
  To: Azimi, Houman (GXS), cygwin

cygwin-apps@ is the wrong mailing list for this.
Redirecting to cygwin@:


Azimi, Houman (GXS) wrote:
> I am trying to use the system() calll, for example system("echo
> hello"); but it does not work, even though system(NULL); returns
> non-zero. 
> 
> It does work in the cygwin environment, but I need it to work on a dos
> command line with cygwin DLL in the path.
> 
> thanks in advance,
> Houman

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: system() problem
  1998-01-12  4:45 system() problem Dezso_Kovacs%OPELHUNGARY_SZG
@ 1998-01-18 16:07 ` Michael Hirmke
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Hirmke @ 1998-01-18 16:07 UTC (permalink / raw)
  To: gnu-win32

Hi Dezso,

[...]
>#include <stdlib.h>
>int main (void)
>{
>        int i;
>        i = system ("dir");
>        return i;
>}
>
>When I run the program it prints "failure!!!!!" and returns -1.
>The system() did not work with any other arguments I tried except NULL when
> it returned 1 (and
>there was no failure message then).
>
>Is it a bug or did I do something wrong?

Don't know, what you did wrong. Your code works here without any
problem. Even if not, I can't imagine, who or what is responsible for
the "failure" printout. Neither dir nor the system function ever print
such a message.

>
>Thank you,
>
>     Dezso Kovacs

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://minimike.franken.de/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* system() problem
@ 1998-01-12  4:45 Dezso_Kovacs%OPELHUNGARY_SZG
  1998-01-18 16:07 ` Michael Hirmke
  0 siblings, 1 reply; 7+ messages in thread
From: Dezso_Kovacs%OPELHUNGARY_SZG @ 1998-01-12  4:45 UTC (permalink / raw)
  To: gnu-win32

Hello!

I have installed the GNU-win32 b18 on NT 3.51 and compiled this code with
gcc:

#include <stdlib.h>
int main (void)
{
        int i;
        i = system ("dir");
        return i;
}

When I run the program it prints "failure!!!!!" and returns -1.
The system() did not work with any other arguments I tried except NULL when
 it returned 1 (and
there was no failure message then).

Is it a bug or did I do something wrong?

Thank you,

     Dezso Kovacs
     d.kovacs@opel.hu


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-02-09 17:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-07  9:45 SYSTEM Problem Jaspreet Singh
2009-02-09 11:48 ` Corinna Vinschen
2009-02-09 12:17   ` Jaspreet Singh
2009-02-09 17:21     ` Corinna Vinschen
     [not found] <5D6C51A4D866144C852423F6B2779A140319F4@sun01bxgxs.internal.gxs.com>
2003-02-10 15:25 ` SYSTEM() problem Max Bowsher
  -- strict thread matches above, loose matches on Subject: below --
1998-01-12  4:45 system() problem Dezso_Kovacs%OPELHUNGARY_SZG
1998-01-18 16:07 ` Michael Hirmke

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).