|
Lines 155-160
Link Here
|
| 155 |
Option("--domain-critical-only", |
155 |
Option("--domain-critical-only", |
| 156 |
help="only replicate critical domain objects", |
156 |
help="only replicate critical domain objects", |
| 157 |
action="store_true"), |
157 |
action="store_true"), |
|
|
158 |
Option("--promote-existing", |
| 159 |
help="keep the SID during join", |
| 160 |
action="store_true"), |
| 158 |
Option("--machinepass", type=str, metavar="PASSWORD", |
161 |
Option("--machinepass", type=str, metavar="PASSWORD", |
| 159 |
help="choose machine password (otherwise random)") |
162 |
help="choose machine password (otherwise random)") |
| 160 |
] |
163 |
] |
|
Lines 188-200
Link Here
|
| 188 |
join_DC(server=server, creds=creds, lp=lp, domain=domain, |
191 |
join_DC(server=server, creds=creds, lp=lp, domain=domain, |
| 189 |
site=site, netbios_name=netbios_name, targetdir=targetdir, |
192 |
site=site, netbios_name=netbios_name, targetdir=targetdir, |
| 190 |
domain_critical_only=domain_critical_only, |
193 |
domain_critical_only=domain_critical_only, |
| 191 |
machinepass=machinepass) |
194 |
machinepass=machinepass, promote_existing=True) |
| 192 |
return |
195 |
return |
| 193 |
elif role == "RODC": |
196 |
elif role == "RODC": |
| 194 |
join_RODC(server=server, creds=creds, lp=lp, domain=domain, |
197 |
join_RODC(server=server, creds=creds, lp=lp, domain=domain, |
| 195 |
site=site, netbios_name=netbios_name, targetdir=targetdir, |
198 |
site=site, netbios_name=netbios_name, targetdir=targetdir, |
| 196 |
domain_critical_only=domain_critical_only, |
199 |
domain_critical_only=domain_critical_only, |
| 197 |
machinepass=machinepass) |
200 |
machinepass=machinepass, promote_existing=True) |
| 198 |
return |
201 |
return |
| 199 |
elif role == "SUBDOMAIN": |
202 |
elif role == "SUBDOMAIN": |
| 200 |
netbios_domain = lp.get("workgroup") |
203 |
netbios_domain = lp.get("workgroup") |