public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* newbie: using su
@ 2000-08-29 15:43 michael.cameron
  2000-08-30  0:25 ` Doug Wyatt
  0 siblings, 1 reply; 6+ messages in thread
From: michael.cameron @ 2000-08-29 15:43 UTC (permalink / raw)
  To: cygwin

Where can I find out what the following means?
I want to run a shell as a different user.
TIA,
MC



mcameron@DONTCARE ~
$ su - trendadm
su: cannot set user id: Not owner

mcameron@DONTCARE ~

-----------------------------------------------------
Get free personalized email at http://email.lycos.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: newbie: using su
  2000-08-29 15:43 newbie: using su michael.cameron
@ 2000-08-30  0:25 ` Doug Wyatt
  0 siblings, 0 replies; 6+ messages in thread
From: Doug Wyatt @ 2000-08-30  0:25 UTC (permalink / raw)
  To: michael.cameron, cygwin

Last I heard, su won't do anything for you in Cygwin.  But, if
you are on NT4, and have the NT Resource Kit, you can create
a shortcut to use the su.exe that comes with NTResKit.

Example:
    With NTResKit in C:\etc\ntreskit and Cygwin in C:\cygwin, the
    shortcut Target string would look something like this:

    C:\etc\ntreskit\su.exe  LogName  C:\cygwin\cygwin.bat  .  -w

You'll get a small command window with a password prompt.  Just
give the correct password for LogName and the first window will go
away and a Bash window will appear.

Regards,
Doug Wyatt

> Where can I find out what the following means?
> I want to run a shell as a different user.
> TIA,
> MC
> 
> 
> 
> mcameron@DONTCARE ~
> $ su - trendadm
> su: cannot set user id: Not owner
> 
> mcameron@DONTCARE ~
> 
> -----------------------------------------------------
> Get free personalized email at http://email.lycos.com
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: newbie: using su
  2000-08-31  2:51 ` Doug Wyatt
@ 2000-08-31  3:15   ` Corinna Vinschen
  0 siblings, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2000-08-31  3:15 UTC (permalink / raw)
  To: cygwin

Doug Wyatt wrote:
> 
> Hi,
> 
> I'm sorry, but I don't know the answers to your questions about juggling
> the /etc/passwd file.  My superficial answer would be that when you
> logon to the PC, that's who you are, unless you use the ntreskit su.exe.
> The /etc/passwd file only provides a unix-like image of the PC's
> authentication info for unix tools to use.

Correct.

> I believe the string in the GECOS field is an NT SID.

Ditto.

I suggest reading the online documentation

	http://sources.redhat.com/cygwin/docs.html

especially the ntsec chapter.

> Regards,
> Doug Wyatt
> 
> > Okay, so su doesn't work, can I just use brute force? If I ALWAYS want
> > to log on as another user (the "owner" of a particular application) and never
> > as me (my W2K login for mail etc..)
> >
> > What if I remove my entry from /etc/passwd, make a copy of the desired
> > users entry in /etc/passwd then change the name in that entry to my user
> > name (making sure this entry comes after the real users entry).  I then log
> > in as me but am now the first user.  Any side-effects that I should be aware
> > of?

The only side effect is that it won't work.

> > example:
> > desireduser::1002:513:The user I want to be,S-1-5-21-1538995194-1560047842-1096501715-1002::/bin/sh
> > me::1002:513:trendadm,S-1-5-21-1538995194-1560047842-1096501715-1002::/bin/sh
> >
> >
> > Michael
> >
> > P.S. What is that entry in the gecos field?

Corinna

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

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: newbie: using su
  2000-08-30  1:56 michael.cameron
@ 2000-08-31  2:51 ` Doug Wyatt
  2000-08-31  3:15   ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Doug Wyatt @ 2000-08-31  2:51 UTC (permalink / raw)
  To: michael.cameron; +Cc: cygwin

Hi,

I'm sorry, but I don't know the answers to your questions about juggling
the /etc/passwd file.  My superficial answer would be that when you
logon to the PC, that's who you are, unless you use the ntreskit su.exe.
The /etc/passwd file only provides a unix-like image of the PC's
authentication info for unix tools to use.

I believe the string in the GECOS field is an NT SID.

Regards,
Doug Wyatt

> Okay, so su doesn't work, can I just use brute force? If I ALWAYS want
> to log on as another user (the "owner" of a particular application) and never
> as me (my W2K login for mail etc..)
> 
> What if I remove my entry from /etc/passwd, make a copy of the desired
> users entry in /etc/passwd then change the name in that entry to my user
> name (making sure this entry comes after the real users entry).  I then log
> in as me but am now the first user.  Any side-effects that I should be aware
> of?
> 
> example:
> desireduser::1002:513:The user I want to be,S-1-5-21-1538995194-1560047842-1096501715-1002::/bin/sh
> me::1002:513:trendadm,S-1-5-21-1538995194-1560047842-1096501715-1002::/bin/sh
> 
> 
> Michael
> 
> P.S. What is that entry in the gecos field?




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: newbie: using su
@ 2000-08-30  1:56 michael.cameron
  2000-08-31  2:51 ` Doug Wyatt
  0 siblings, 1 reply; 6+ messages in thread
From: michael.cameron @ 2000-08-30  1:56 UTC (permalink / raw)
  To: cygwin

Okay, so su doesn't work, can I just use brute force? If I ALWAYS want to log on as another user (the "owner" of a particular application) and never as me (my W2K login for mail etc..)

What if I remove my entry from /etc/passwd, make a copy of the desired users entry in /etc/passwd then change the name in that entry to my user name (making sure this entry comes after the real users entry).  I then log in as me but am now the first user.  Any side-effects that I should be aware of?

example:
desireduser::1002:513:The user I want to be,S-1-5-21-1538995194-1560047842-1096501715-100
2::/bin/sh
me::1002:513:trendadm,S-1-5-21-1538995194-1560047842-1096501715-1002::/bin/sh


Michael

P.S. What is that entry in the gecos field?




-----------------------------------------------------
Get free personalized email at http://email.lycos.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: newbie: using su
@ 2000-08-30  0:55 michael.cameron
  0 siblings, 0 replies; 6+ messages in thread
From: michael.cameron @ 2000-08-30  0:55 UTC (permalink / raw)
  To: cygwin

>Last I heard, su won't do anything for you in Cygwin.  >But, if
>you are on NT4, and have the NT Resource Kit, you can >create
>a shortcut to use the su.exe that comes with NTResKit.

>Example:
>    With NTResKit in C:\etc\ntreskit and Cygwin in >C:\cygwin, the
>    shortcut Target string would look something like >this:
>
>    C:\etc\ntreskit\su.exe  LogName  >C:\cygwin\cygwin.bat  .  -w
>
>You'll get a small command window with a password >prompt.  Just
>give the correct password for LogName and the first >window will go
>away and a Bash window will appear.
>
>Regards,
>Doug Wyatt


Thanks, I'm using W2K.  Where is this information though?  The man page implies that it works okay (or am I being dumb in assuming the man page and executables existance means anything?). The documentation doesn't seem to mention anything on the subject as far as I can see.

Still puzzled.

MC

-----------------------------------------------------
Get free personalized email at http://email.lycos.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~2000-08-31  3:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-29 15:43 newbie: using su michael.cameron
2000-08-30  0:25 ` Doug Wyatt
2000-08-30  0:55 michael.cameron
2000-08-30  1:56 michael.cameron
2000-08-31  2:51 ` Doug Wyatt
2000-08-31  3:15   ` Corinna Vinschen

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