Bug 57187 - AD Takeover fails, possible Typo in 96univention-samba4.inst?
AD Takeover fails, possible Typo in 96univention-samba4.inst?
Status: NEW
Product: UCS
Classification: Unclassified
Component: AD Takeover
UCS 5.0
amd64 Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2024-03-26 08:09 CET by Dirk Jansen
Modified: 2024-04-12 22:24 CEST (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Jansen 2024-03-26 08:09:42 CET
The AD Takeover fails with "The domain is in AD Member Mode, cannot join as DC"

In /usr/lib/univention-install/96univention-samba4.inst the function get_samba_role() queries the variable $server_role. 

This variable contains the role of the server in OpenLDAP (UCR: server/role). The role of the server in AD is contained in the variable $samba_role (UCR: samba/role).

If the AD Connector was previously installed on the server, the error "The domain is in AD Member Mode, cannot join as $samba4_role" is always generated in the configure_samba_role function, because $samba4_role = "DC" and is_domain_in_admember_mode = true.

Shouldn't $samba_role be queried in get_samba_role?