asdasdasd
All checks were successful
Deploy / deploy-staging (push) Successful in 24s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-15 21:50:41 +02:00
parent 5408a2bb89
commit 27c0825111
3 changed files with 31 additions and 12 deletions

View File

@@ -35,6 +35,7 @@ final class RegistrationLdifBuilder
$mail = trim((string) ($request['email'] ?? ''));
$appleGeneratedUid = trim((string) ($provisioning['apple_generateduid'] ?? $this->generateUuidV4()));
$sambaSid = trim((string) ($provisioning['samba_sid'] ?? ''));
$appleSchemaEnabled = (bool) ($this->config['ldap']['apple_schema_enabled'] ?? false);
$shadowExpire = (string) ($this->config['ldap']['shadow_expire'] ?? 1);
$shadowFlag = (string) ($this->config['ldap']['shadow_flag'] ?? 0);
$shadowInactive = (string) ($this->config['ldap']['shadow_inactive'] ?? 0);
@@ -77,16 +78,19 @@ final class RegistrationLdifBuilder
}
$lines[] = 'dn: uid=' . $username . ',' . $usersDn;
$lines[] = 'objectClass: apple-user';
$lines[] = 'objectClass: extensibleObject';
$lines[] = 'objectClass: inetOrgPerson';
$lines[] = 'objectClass: organizationalPerson';
$lines[] = 'objectClass: person';
$lines[] = 'objectClass: posixAccount';
$lines[] = 'objectClass: sambaIdmapEntry';
$lines[] = 'objectClass: sambaSamAccount';
$lines[] = 'objectClass: shadowAccount';
$lines[] = 'objectClass: top';
if ($appleSchemaEnabled) {
$lines[] = 'objectClass: apple-user';
$lines[] = 'objectClass: extensibleObject';
}
$lines[] = 'cn: ' . $cn;
if ($gidNumber !== '') {
@@ -106,10 +110,13 @@ final class RegistrationLdifBuilder
$lines[] = 'uidNumber: ' . $uidNumber;
}
$lines[] = 'apple-generateduid: ' . strtoupper($appleGeneratedUid);
$lines[] = 'authAuthority: ;basic;';
$lines[] = 'displayName: ' . ($displayName !== '' ? $displayName : $username);
if ($appleSchemaEnabled) {
$lines[] = 'apple-generateduid: ' . strtoupper($appleGeneratedUid);
$lines[] = 'authAuthority: ;basic;';
}
if ($gecos !== '') {
$lines[] = 'gecos: ' . $gecos;
}
@@ -125,6 +132,11 @@ final class RegistrationLdifBuilder
$lines[] = 'memberOf: ' . $groupDn;
}
$lines[] = 'pwdLastSet: 0';
$lines[] = 'sambaAcctFlags: [U ]';
$lines[] = 'sambaLMPassword: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
$lines[] = 'sambaPasswordHistory: 0000000000000000000000000000000000000000000000000000000000000000';
$lines[] = 'sambaPwdLastSet: 0';
$lines[] = 'shadowExpire: ' . $shadowExpire;
$lines[] = 'shadowFlag: ' . $shadowFlag;
$lines[] = 'shadowInactive: ' . $shadowInactive;