public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: passwd-group post install scripts
@ 2002-10-24  9:26 Vince Hoffman
  0 siblings, 0 replies; 4+ messages in thread
From: Vince Hoffman @ 2002-10-24  9:26 UTC (permalink / raw)
  To: Vince Hoffman, 'cygwin@cygwin.com'

[-- Attachment #1: Type: text/plain, Size: 1598 bytes --]

doh and heres the bat file 

> -----Original Message-----
> From: Vince Hoffman [mailto:Vince.Hoffman@uk.circle.com]
> Sent: 24 October 2002 16:59
> To: 'cygwin@cygwin.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/
> 


[-- Attachment #2: passwd-grp-bat.txt --]
[-- Type: text/plain, Size: 877 bytes --]

@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



[-- Attachment #3: Type: text/plain, Size: 214 bytes --]

--
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] 4+ messages in thread

* RE: passwd-group post install scripts
@ 2002-10-24  9:47 Harig, Mark A.
  0 siblings, 0 replies; 4+ messages in thread
From: Harig, Mark A. @ 2002-10-24  9:47 UTC (permalink / raw)
  To: Vince Hoffman, cygwin

Also, you might want to group the Winnt/Win2k/xp tests
at the top of the batch file, and then throw away the
windows 95/98/ME tests, and let the batch file simply
fall through to that code if the Winnt/Win2k/xp tests
fail.

> -----Original Message-----
> From: Vince Hoffman [mailto:Vince.Hoffman@uk.circle.com]
> Sent: Thursday, October 24, 2002 12:01 PM
> To: Vince Hoffman; 'cygwin@cygwin.com'
> Subject: RE: passwd-group post install scripts
> 
> 
> doh and heres the bat file 
> 
> > -----Original Message-----
> > From: Vince Hoffman [mailto:Vince.Hoffman@uk.circle.com]
> > Sent: 24 October 2002 16:59
> > To: 'cygwin@cygwin.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/
> > 
> 
> 

--
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] 4+ messages in thread

* RE: passwd-group post install scripts
@ 2002-10-24  9:33 Harig, Mark A.
  0 siblings, 0 replies; 4+ messages in thread
From: Harig, Mark A. @ 2002-10-24  9:33 UTC (permalink / raw)
  To: Vince Hoffman, cygwin

There was a discussion about the ordering of '-u <user> -d <domain>'
options to 'mkpasswd' back around August 13-16.  You may want to
review them.

>On Fri, 13 Sep 2002, Igor wrote:
>> It may be that the order of arguments matters, and that the correct
way to
>>  specify the username and the domain would be
>> 	mkpasswd -u MY_USER_ID -d MY_DOMAIN >> /etc/passwd
>> but the point remains the same.
>
>You're right, Igor.  I'd already tried the -u switch and seen that
>it didn't appear to work; I'd not thought of the possibility that
>the mkpasswd code was sensitive to the order of the command-line
>switches!
>The answer pops out in under a second using -u before -d.  Perfect.
>
>Rick.

> -----Original Message-----
> From: Vince Hoffman [mailto:Vince.Hoffman@uk.circle.com]
> Sent: Thursday, October 24, 2002 12:01 PM
> To: Vince Hoffman; 'cygwin@cygwin.com'
> Subject: RE: passwd-group post install scripts
> 
> 
> doh and heres the bat file 
> 
> > -----Original Message-----
> > From: Vince Hoffman [mailto:Vince.Hoffman@uk.circle.com]
> > Sent: 24 October 2002 16:59
> > To: 'cygwin@cygwin.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/
> > 
> 
> 

--
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] 4+ messages in thread

* passwd-group post install scripts
@ 2002-10-24  9:19 Vince Hoffman
  0 siblings, 0 replies; 4+ messages in thread
From: Vince Hoffman @ 2002-10-24  9:19 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

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/

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

end of thread, other threads:[~2002-10-24 16:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-24  9:26 passwd-group post install scripts Vince Hoffman
  -- strict thread matches above, loose matches on Subject: below --
2002-10-24  9:47 Harig, Mark A.
2002-10-24  9:33 Harig, Mark A.
2002-10-24  9:19 Vince Hoffman

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