esackbauer
Ja, ich habe eine E-Mail Adresse an dem Benutzer im AD hinterlegt
Weshalb sollte der Benutzername nich das passende Attribut sein?
Nein, ich muss zugeben, ich mache den ganzen Tag was anderes, AD und Exchange nur so nebenher (bin IT Administrator im Mittelstand, da muss man alles irgendwie machen, meistens halt leider nur mit Halbwissen)
Kannst du mir sagen, ob das was ich hier vorhabe, überhaupt umsetzbar ist?
Ich konnte mit der ldp.exe herausfinden, dass an dem Server selbst LDAP via Port 389 funktioniert
Nachfolgend das Log:
ld = ldap_open(“10.xxx.xx.11”, 389);
Established connection to 10.xxx.xx.11.
Retrieving base DSA information…
Getting 1 entries:
Dn: (RootDSE)
configurationNamingContext: CN=Configuration,DC=network,DC=local;
currentTime: 05.10.2025 17:49:00 Mitteleuropäische Somm;
defaultNamingContext: DC=network,DC=local;
dnsHostName: PDC251.network.local;
domainControllerFunctionality: 10 = ( WIN2025 );
domainFunctionality: 10 = ( WIN2025 );
dsServiceName: CN=NTDS Settings,CN=PDC251,CN=Servers,CN=Network,CN=Sites,CN=Configuration,DC=network,DC=local;
forestFunctionality: 10 = ( WIN2025 );
highestCommittedUSN: 41048;
isGlobalCatalogReady: TRUE;
isSynchronized: TRUE;
ldapServiceName: network.local:pdc251$@NETWORK.LOCAL;
namingContexts (5): DC=network,DC=local; CN=Configuration,DC=network,DC=local; CN=Schema,CN=Configuration,DC=network,DC=local; DC=DomainDnsZones,DC=network,DC=local; DC=ForestDnsZones,DC=network,DC=local;
rootDomainNamingContext: DC=network,DC=local;
schemaNamingContext: CN=Schema,CN=Configuration,DC=network,DC=local;
serverName: CN=PDC251,CN=Servers,CN=Network,CN=Sites,CN=Configuration,DC=network,DC=local;
subschemaSubentry: CN=Aggregate,CN=Schema,CN=Configuration,DC=network,DC=local;
supportedCapabilities (6): 1.2.840.113556.1.4.800 = ( ACTIVE_DIRECTORY ); 1.2.840.113556.1.4.1670 = ( ACTIVE_DIRECTORY_V51 ); 1.2.840.113556.1.4.1791 = ( ACTIVE_DIRECTORY_LDAP_INTEG ); 1.2.840.113556.1.4.1935 = ( ACTIVE_DIRECTORY_V61 ); 1.2.840.113556.1.4.2080 = ( ACTIVE_DIRECTORY_V61_R2 ); 1.2.840.113556.1.4.2237 = ( ACTIVE_DIRECTORY_W8 );
supportedControl (40): 1.2.840.113556.1.4.319 = ( PAGED_RESULT ); 1.2.840.113556.1.4.801 = ( SD_FLAGS ); 1.2.840.113556.1.4.473 = ( SORT ); 1.2.840.113556.1.4.528 = ( NOTIFICATION ); 1.2.840.113556.1.4.417 = ( SHOW_DELETED ); 1.2.840.113556.1.4.619 = ( LAZY_COMMIT ); 1.2.840.113556.1.4.841 = ( DIRSYNC ); 1.2.840.113556.1.4.529 = ( EXTENDED_DN ); 1.2.840.113556.1.4.805 = ( TREE_DELETE ); 1.2.840.113556.1.4.521 = ( CROSSDOM_MOVE_TARGET ); 1.2.840.113556.1.4.970 = ( GET_STATS ); 1.2.840.113556.1.4.1338 = ( VERIFY_NAME ); 1.2.840.113556.1.4.474 = ( RESP_SORT ); 1.2.840.113556.1.4.1339 = ( DOMAIN_SCOPE ); 1.2.840.113556.1.4.1340 = ( SEARCH_OPTIONS ); 1.2.840.113556.1.4.1413 = ( PERMISSIVE_MODIFY ); 2.16.840.1.113730.3.4.9 = ( VLVREQUEST ); 2.16.840.1.113730.3.4.10 = ( VLVRESPONSE ); 1.2.840.113556.1.4.1504 = ( ASQ ); 1.2.840.113556.1.4.1852 = ( QUOTA_CONTROL ); 1.2.840.113556.1.4.802 = ( RANGE_OPTION ); 1.2.840.113556.1.4.1907 = ( SHUTDOWN_NOTIFY ); 1.2.840.113556.1.4.1948 = ( RANGE_RETRIEVAL_NOERR ); 1.2.840.113556.1.4.1974 = ( FORCE_UPDATE ); 1.2.840.113556.1.4.1341 = ( RODC_DCPROMO ); 1.2.840.113556.1.4.2026 = ( DN_INPUT ); 1.2.840.113556.1.4.2064 = ( SHOW_RECYCLED ); 1.2.840.113556.1.4.2065 = ( SHOW_DEACTIVATED_LINK ); 1.2.840.113556.1.4.2066 = ( POLICY_HINTS_DEPRECATED ); 1.2.840.113556.1.4.2090 = ( DIRSYNC_EX ); 1.2.840.113556.1.4.2205 = ( UPDATE_STATS ); 1.2.840.113556.1.4.2204 = ( TREE_DELETE_EX ); 1.2.840.113556.1.4.2206 = ( SEARCH_HINTS ); 1.2.840.113556.1.4.2211 = ( EXPECTED_ENTRY_COUNT ); 1.2.840.113556.1.4.2239 = ( POLICY_HINTS ); 1.2.840.113556.1.4.2255 = ( SET_OWNER ); 1.2.840.113556.1.4.2256 = ( BYPASS_QUOTA ); 1.2.840.113556.1.4.2309 = ( LINK_TTL ); 1.2.840.113556.1.4.2330; 1.2.840.113556.1.4.2354;
supportedLDAPPolicies (22): MaxPoolThreads; MaxPercentDirSyncRequests; MaxDatagramRecv; MaxReceiveBuffer; MaxPreAuthReceiveBuffer; InitRecvTimeout; MaxConnections; MaxConnIdleTime; MaxPageSize; MaxBatchReturnMessages; MaxQueryDuration; MaxDirSyncDuration; MaxTempTableSize; MaxResultSetSize; MinResultSets; MaxResultSetsPerConn; MaxNotificationPerConn; MaxValRange; MaxValRangeTransitive; ThreadMemoryLimit; SystemMemoryLimitPercent; SecurityDescriptorWarningSize;
supportedLDAPVersion (2): 3; 2;
supportedSASLMechanisms (4): GSSAPI; GSS-SPNEGO; EXTERNAL; DIGEST-MD5;
0 = ldap_set_option(ld, LDAP_OPT_ENCRYPT, 0)
res = ldap_bind_s(ld, NULL, &NtAuthIdentity, NEGOTIATE (1158)); // v.3
{NtAuthIdentity: User=‘Administrator’; Pwd=<unavailable>; domain = ‘network’}
Authenticated as: ‘NETWORK\Administrator’.