Bug 30105 - dns-<hostname> account can't be created
dns-<hostname> account can't be created
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Samba 4 - Slave PDC
UCS@school 3.1
Other Linux
: P5 normal (vote)
: UCS@school 3.1
Assigned To: Arvid Requate
Stefan Gohmann
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-22 11:13 CET by Stefan Gohmann
Modified: 2013-02-15 17:51 CET (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 Stefan Gohmann univentionstaff 2013-01-22 11:13:07 CET
The dns-<hostname> account can't be created in the join script of a school slave:

Configure 98univention-samba4-dns.inst
Waiting for RID Pool replication: done.
univention_samaccountname_ldap_check: ldb_add of user and group object is disabled

ERROR(ldb): Failed to add user 'dns-slave523':  - ldb_request: Unwilling to perform (53)
WARNING: No path in service IPC$ - making it unavailable!
NOTE: Service IPC$ is flagged unavailable.
WARNING: No path in service IPC$ - making it unavailable!
NOTE: Service IPC$ is flagged unavailable.


As a result only some of the SRV records are available after the join:

root@slave523:~# host -al deadlock52.local | grep SRV
_ldap._tcp.deadlock52.local. 900 IN     SRV     100 0 389 slave523.deadlock52.local.
_kerberos._udp.deadlock52.local. 900 IN SRV     100 0 88 slave523.deadlock52.local.
_kerberos._tcp.deadlock52.local. 900 IN SRV     100 0 88 slave523.deadlock52.local.
_kerberos-adm._tcp.deadlock52.local. 900 IN SRV 100 0 88 slave523.deadlock52.local.
_domaincontroller_master._tcp.deadlock52.local. 900 IN SRV 0 0 0 master521.deadlock52.local.
Comment 1 Arvid Requate univentionstaff 2013-01-22 13:15:43 CET
In UCS 3.0 the dns-<hostname> account was created in 96univention-samba4.inst locally in the sam.ldb, before 97libunivention-ldb-modules.inst registered the LDB module denying local user and group creation. In UCS 3.1 the creation of the DNS service account was postponed to 98univention-samba4-dns.inst, so the univention_samaccountname_ldap_check now denies local account creation.

Due to the workaround for Bug 26841 the DNS service account is explicitely ignored by the S4 Connector (Bug 26861, the corresponding variable is set in 62ucs-school-slave.inst and 62ucs-school-master.inst), so the account only exists locally in the sam.ldb of the corresponding Slave-PDC.

Note: Bug 26504 shifted the rIDAllocationPool a bit on the Slave-PDCs (to 2100), so there are no immediate collisions with a DC Master (rIDAllocationPool: 1100-1599) and a DC Backup (rIDAllocationPool: 1600-2099) in the school headquaters.

The joinscript univention-squid-kerberos/98univention-squid-samba4.inst gives an example how these service accounts can be created via UDM, probably this would be a good approach. This would require to take dns-<hostname> from the connector/s4/mapping/user/ignorelist though.
Comment 2 Arvid Requate univentionstaff 2013-01-22 19:59:50 CET
As a workaround the relevant initial portion of 98univention-samba4-dns.inst was duplicated now as univention-ldb-modules/96univention-samba4-slavepdc.inst.
The new Bug #30115 recommends the solution described in Comment 1 for a later release of the UCS platform product.

Updated changelog is commited to SVN.
Comment 3 Stefan Gohmann univentionstaff 2013-01-23 11:10:38 CET
OK, the account is now created.
Comment 4 Stefan Gohmann univentionstaff 2013-01-24 09:12:26 CET
The join script order is wrong:

RUNNING 96univention-samba4-slavepdc.inst
Samba4 backend database not available yet, exiting joinscript 98univention-samba4-dns.
EXITCODE=1
RUNNING 96univention-samba4.inst
Multifile: /etc/samba/smb.conf
Setting samba/quota/command
Comment 5 Arvid Requate univentionstaff 2013-01-24 15:43:11 CET
In der Testumgebung war LC_COLLATE='C' gesetzt, der Bug müsste in univention-join gefixt werden:

LC_COLLATE="C" bash -c 'ls /usr/lib/univention-install/*.inst'

vs.

LC_COLLATE="de_E.UTF-8" bash -c 'ls /usr/lib/univention-install/*.inst'
Comment 6 Arvid Requate univentionstaff 2013-01-24 17:00:18 CET
Fixed by renaming the scripts:

 univention-ldb-modules/96univention-samba4-slavepdc.inst
to
 univention-ldb-modules/96univention-samba4slavepdc.inst
and
 univention-ldb-modules/98univention-samba4-dns-slavepdc.inst
to
 univention-ldb-modules/98univention-samba4slavepdc-dns.inst

The general problem should be fixed via Bug #30168.
Comment 7 Arvid Requate univentionstaff 2013-01-24 20:19:30 CET
The updated package is actually built now as well, changelog not required for a bug in an unreleased version.
Comment 8 Stefan Gohmann univentionstaff 2013-01-28 14:09:06 CET
OK
Comment 9 Sönke Schwardt-Krummrich univentionstaff 2013-02-15 17:51:05 CET
UCS@school 3.1 has been released: 
 http://forum.univention.de/viewtopic.php?f=26&t=2364

If this error occurs again, please use "Clone This Bug".