Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199909241307.JAA03863@dagda.sunflower.com> From: "Doug Wyatt" To: cygwin AT sourceware DOT cygnus DOT com Date: Fri, 24 Sep 1999 08:07:17 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Trying to use NTReskit su.exe Reply-to: dwyatt AT sunflower DOT com In-reply-to: <199909222344.TAA00534@dagda.sunflower.com> X-mailer: Pegasus Mail for Win32 (v3.11) A followup - I seem to have gotten this to work, logging on with a userid in the Administrators group, then using NTReskit's su.exe to run Cygwin Bash under a non-Administrator account name. File ownership works properly and no inappropriate highlighting of text. I still get the error during the startup PrepareEnvironmentBlock error! (rc=5) Access is denied. but only on the second and subsequent concurrent invocations. No new problems, so far. Doug > A short while back, it was suggested to me that running Cygwin32 from > a username in the Administrators group was a bad idea. I created a > new username and have been using it since then without any of the > problems I had before. But it's a real pain to have to re-login periodically > as an administrator-enabled user to accomplish numerous actions that > require it. I tend to like to clutter up my Windows desktop with dozens > of open windows, especially browsers open to various Web pages for > reference. > > I've been trying to use the NTReskit su.exe from my admin login account > to open up a bash shell under a NonAdm account. I created a shortcut: > > "c:\Program Files\NTReskit\su" NonAdm d:\cygnus\cygwin-b20\cygnus.bat . -v > > When I run it, it creates a cmd.exe window which prompts for the password > and after that opens another cmd.exe window in which bash seems to be the > command interpreter. There are a few problems, however. > > * There is an error in the verbose output in the first cmd.exe window: > > Password: > User=NonAdm > Domain=. > ReferencedDomain=AMANDA > CommandLine=d:\cygnus\cygwin-b20\cygnus.bat > TextualSid=S-1-5-21-1587175470-489960911-355810188-1002 > Set CLASSPATH=%QTJava% > Set ComSpec=C:\WINNT\system32\cmd.exe > Set MSINPUT=C:\Program Files\MS Hardware > Set NTRESKIT=C:\Program Files\NTReskit > Set NUMBER_OF_PROCESSORS=1 > Set OS=Windows_NT > Set Os2LibPath=C:\WINNT\system32\os2\dll; > Set Path=c:\perl5\bin;C:\WINNT\system32;C:\WINNT;D:\cygnus\cygwin-b20\H-i586-cygwin32\bin;C:\Program > Files\NTReskit > Set PROCESSOR_ARCHITECTURE=x86 > Set PROCESSOR_IDENTIFIER=x86 Family 6 Model 5 Stepping 1, GenuineIntel > Set PROCESSOR_LEVEL=6 > Set PROCESSOR_REVISION=0501 > Set QTJAVA=D:\etc\jdk1.2.1\jre\lib\ext\QTJava.zip > Set windir=C:\WINNT > PrepareEnvironmentBlock error! (rc=5) > Access is denied. > LogonSid=S-1-5-5-0-2386380 > CurrentWinsta+Desktop=WinSta0\Default > TargetWinsta+Desktop=WinSta0\Default > > A search of the MSKB turns up no references to PrepareEnvironmentBlock; > is this part of the Cygnus pkg? I did see something about a winenv() function > in the Cygwin Developers list archive. Does anyone know why access is > denied? > > * Creating new files does not give them NonAdm ownership. Chown doesn't > change the ownership. Is there something like real and effective UID's in NT? > > * Highlighting gets turned on for all text after 'ls -laL'. Clear switches the 'bash' > window to reverse video, a couple of ls -laL cmds switch it back to just the text > being reverse video. > > Does anyone have any ideas or suggestions, before I switch back to logging on > as NonAdm, and try using su.exe to perform the Admin functions instead? > ========================================================== Doug Wyatt E-Mail: dwyatt AT sunflower DOT com Sys Admin Phone: 785-843-4099 Kohlman Systems Research, Inc. Fax: 785-843-6459 319 Perry St., Lawrence, KS 66044 USA -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com