winxppro install then join domain?

Antworten
zero0ne
Beiträge: 13
Registriert: 10 Jul 2008, 03:30

winxppro install then join domain?

Beitrag von zero0ne »

How would i get this to happen?

should this be setup with wInst? or should I do this through a windows config file in the i386 install directory itself?

Thanks

Chris
Benutzeravatar
wolfbardo
uib-Team
Beiträge: 1354
Registriert: 01 Jul 2008, 12:10

Re: winxppro install then join domain?

Beitrag von wolfbardo »

Hello,

1. possibility
edit unattend.txt
usually in (/opt/pcbin/install/winxppro/opsi/$oem$/unattend/unattend.txt
but be warned. The password is transferred in cleartext by the installation

2. possibility

use netdom.exe in a winstxscript

3. possibility
use wmi in a winst-script

Regards
Bardo Wolf


OPSICONF 2024
https://opsi.org/en/opsiconf/

Basisworkshop Mainz :

17. - 20. 06. 2024


opsi support - uib gmbh
For productive opsi installations we recommend maintainance + support contracts which are the base of opsi development.

http://www.uib.de
Benutzeravatar
wolfbardo
uib-Team
Beiträge: 1354
Registriert: 01 Jul 2008, 12:10

Re: winxppro install then join domain?

Beitrag von wolfbardo »

wardenik hat geschrieben:
So i presume the required steps are to:
- create a package with
http://www.microsoft.com/downloads/deta ... 6fAQ%3d%3d

and write an winst-script for that package that does the join using WMI or netdom, right?

Is there any package existing for that purpose as this is a quite common usecase?
There is an old Template with the netdom-Utility:

http://www.opsi.org/opsi_wiki/Domchange

Under XP / opsi it works with

http://www.opsi.org/opsi_wiki/TemplateF ... LocalAdmin

Under Vista it works without a temporary admin and wmic (never tested under XP):

Code: Alles auswählen

; Copyright (c) uib umwelt informatik büro gmbh (www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.

[Initial]
; Message at install time:
Message=installing localsetup Script !!!!!!!!!!!!!!!
LogLevel=2
;  Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false



[Aktionen]
DefVar $RebootFlaglocal$
DefVar $WinstRegKey$
DefVar $RebootRegVar$
;Variables for version of the operating system (OS)-Test
DefVar $SYSTEMROOT$
DefVar $SYSTEMDRIVE$
Set $SYSTEMDRIVE$ = "%SYSTEMDRIVE%"
Set $SYSTEMROOT$ = "%SYSTEMROOT%"
DefVar $TEMP$
Set $TEMP$= EnvVar("TEMP")
DefVar $MinorOS$
DefVar $OS$
DefStringlist $outlist$
DefVar $DUMMY$
DefVar $DOMAIN$
DefVar $PARTOFDOMAIN$
DefVar $PCNAME$
DefVar $returncode$
DefVar $returncode_tmp$
Set $returncode$ = ""
Set $returncode_tmp$ = ""


DefStringList list0
DefStringList list1
DefStringList list2


DefVar $NewDomain$
DefVar $NEWPCNAME$
DefVar $NewDomainAdmin$
DefVar $NewDomainAdminPass$
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; EDIT
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Set $NewDomain$="bonifax"
Set $NewDomainAdmin$="opsidomadm"
Set $NewDomainAdminPass$="joinit"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

set $OS$ = GetOS
set $MinorOS$ = GetNTVersion
if ( $MinorOS$ = "Windows Vista"  )

 
 Set $DUMMY$="DOMAIN"
 Set $outlist$=getSubList(2:3,getOutStreamFromSection('DosBatch_status'))
 Set $outlist$ = splitString (takeString (0, $outlist$)," ")
 Set $DOMAIN$ = takeString (0, $outlist$)

 
 Set $DUMMY$="PARTOFDOMAIN"
 Set $outlist$=getSubList(2:3,getOutStreamFromSection('DosBatch_status'))
 Set $outlist$ = splitString (takeString (0, $outlist$)," ")
 Set $PARTOFDOMAIN$ = takeString (0, $outlist$)

 
 Set $DUMMY$="NAME"
 Set $outlist$=getSubList(2:3,getOutStreamFromSection('DosBatch_status'))
 Set $outlist$ = splitString (takeString (0, $outlist$)," ")
 Set $PCNAME$ = takeString (0, $outlist$)
 
Message= join domain

        
	DosInAnIcon_sleep
	Set list0 = getOutStreamFromSection ('DosBatch_joindomain')
	; cut of first 2 lines
        Set list1 = getSublist (8: , list0)
        for $x$ in list1 do sub_returnvalue
        ; second try
	if NOT ($returncode$="0;")
		DosInAnIcon_join
	endif
        ExitWindows /Reboot	  
 
endif

;wmic computersystem get partofdomain,domain,name

[DosBatch_status]
@echo off
wmic computersystem get $DUMMY$

[DosInAnIcon_unjoindomain]
wmic computersystem where name!=null call unjoindomainorworkgroup

[DosInAnIcon_changepcname]
wmic computersystem where name!=null call rename "$NEWPCNAME$","$NewDomainAdminPass$","$NewDomain$\$NewDomainAdmin$"

[DosBatch_joindomain]
wmic computersystem where name!=null call joindomainorworkgroup "",3,"$NewDomain$","$NewDomainAdminPass$","$NewDomainAdmin$"

[sub_returnvalue]
  set list2 = splitStringOnWhitespace ("$x$")
  
  Set $returncode_tmp$ = takestring(3, list2)
  IF NOT ($returncode_tmp$="")
    Set $returncode$ = $returncode_tmp$
  endif

Anyway you should use a user with low privilegies (for example in a Samba Domain use enable privileges = yes in smb.conf and a user withe the SeMachineAccountPrivilege)

regards

Bardo Wolf


OPSICONF 2024
https://opsi.org/en/opsiconf/

Basisworkshop Mainz :

17. - 20. 06. 2024


opsi support - uib gmbh
For productive opsi installations we recommend maintainance + support contracts which are the base of opsi development.

http://www.uib.de
wardenik
Beiträge: 65
Registriert: 27 Okt 2008, 12:22

Re: winxppro install then join domain?

Beitrag von wardenik »

hm, great, thanks!

is there anywhere a detailed diagram that shows *exactly* how the bootup process looks like?
i've seen the diagrams of booting of the system via network, but none of them mentioned i.e. how does the preloader know the actual pcpatch password from, how it authenticates to the webservice (or I missed something in the docs?)

thanks for a great work.
Benutzeravatar
wolfbardo
uib-Team
Beiträge: 1354
Registriert: 01 Jul 2008, 12:10

Re: winxppro install then join domain?

Beitrag von wolfbardo »

wardenik hat geschrieben: is there anywhere a detailed diagram that shows *exactly* how the bootup process looks like?
.... how does the preloader know the actual pcpatch password from, how it authenticates to the webservice (or I missed something in the docs?)
have a look at in http://download.uib.de/opsi3.3/doku/ops ... v33-en.pdf

9.6. Securing the shares with encrypted passwords

4.1.2. Integration of the software installation with the opsi preLoginLoader

4.1.3. Subsequent installation of the opsi-preloginloaders

regards

Bardo Wolf


OPSICONF 2024
https://opsi.org/en/opsiconf/

Basisworkshop Mainz :

17. - 20. 06. 2024


opsi support - uib gmbh
For productive opsi installations we recommend maintainance + support contracts which are the base of opsi development.

http://www.uib.de
Antworten