delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/24/12:00:50

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3500515B75D9D311948800508BA379559508AC@EX-LONDON>
From: Vince Hoffman <Vince DOT Hoffman AT uk DOT circle DOT com>
To: Vince Hoffman <Vince DOT Hoffman AT uk DOT circle DOT com>,
"'cygwin AT cygwin DOT com'"
<cygwin AT cygwin DOT com>
Subject: RE: passwd-group post install scripts
Date: Thu, 24 Oct 2002 17:00:30 +0100
MIME-Version: 1.0

------_=_NextPart_000_01C27B76.79D38D60
Content-Type: text/plain;
	charset="iso-8859-1"

doh and heres the bat file 

> -----Original Message-----
> From: Vince Hoffman [mailto:Vince DOT Hoffman AT uk DOT circle DOT com]
> Sent: 24 October 2002 16:59
> To: 'cygwin AT cygwin DOT com'
> Subject: passwd-group post install scripts
> 
> 
> Since there has been a few questions from people not having 
> their domain
> account automatically added to /etc/passwd I re-wrote 
> passwd-grp.bat to do
> this, although as yet only it has only been tested on NT/2k/95/98. 
> Would this be a wanted change ? 
> Would it be a better idea to send a patch for passwd-grp.sh 
> as at the moment
> this does nothing or is overwritten depending when it is run. 
> (on 98 the .sh
> ran before the .bat and so the created /etc/passwd was 
> overwritten, on 2000
> the .bat ran first so the .sh didn't do anything.)
> Also I haven't found a good way of only adding domain groups 
> the user is a
> member of (windows find is a very crippled grep) so I left it 
> at all Domain
> groups (users, admins, computers etc) which isn't very satisfactory.)
> anyway,
> Comments/laughter/derision welcome.
> 
> --------------------------------------------------------------
> ---------
> Vince Hoffman     NT Administrator
> Euro RSCG Circle (London)
> P: 020 7959 7576  M: 0777 5822213
> Icq: 50905590     PGP ID: 0xC859C861
> --------------------------------------------------------------
> ---------
> 
> 
> --
> 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/
> 


------_=_NextPart_000_01C27B76.79D38D60
Content-Type: text/plain;
	name="passwd-grp-bat.txt"
Content-Disposition: attachment;
	filename="passwd-grp-bat.txt"

@echo off


ver | find "Windows 2000" >nul
if "%errorlevel%"=="0" goto 2000:

ver | find "Windows 98" >nul
if "%errorlevel%"=="0" goto 9x:

ver | find "Windows 95" >nul
if "%errorlevel%"=="0" goto 9x:

ver | find "Windows NT Version 4" >nul
if "%errorlevel%"=="0" goto 2000:

ver | find "Windows ME" >nul
if "%errorlevel%"=="0" goto 9x:

ver | find "Windows XP" >nul
if "%errorlevel%"=="0" goto 2000:


echo Assuming Windows 9x
:9x
rem ****************************** win 9x ****
echo Windows 9x detected
bin\mkpasswd.exe -l > etc\passwd 
bin\mkgroup -l  > etc\group
goto end:

:2000
rem ****************************** win 2k ****
echo Windows 2000/NT/XP detected
bin\mkpasswd.exe -l > etc\passwd
bin\mkgroup -l > etc\group
if %USERDOMAIN% == %COMPUTERNAME% goto end:
bin\mkpasswd.exe -d -u %USERNAME% >> etc\passwd
bin\mkgroup -d |find "Domain" >> etc\group
goto end:


:end



------_=_NextPart_000_01C27B76.79D38D60
Content-Type: text/plain; charset=us-ascii

--
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/
------_=_NextPart_000_01C27B76.79D38D60--

- Raw text -


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