LDAP Error Codes
Aus MHC-Wiki
http://docs.sun.com/source/817-6707/resultcodes.html
LDAP debugging Hinweise
Es ist von vorteil, dass man, wenn man eine meldung betrachtet, sich darüber im klaren ist, wodurch der Zugriff auf den LDAP-Server initiiert wird. Härt sich trivial an war aber für mich oft ein problem beim debuggen der Sambakonfiguration. Es kann nämlich leicht passieren, dass man Seachpatterns im völlig falschen Kontext sucht. Zum Beispiel macht Samba auch NSS lookups für Maschinenaccounts. Die werden natülich auch vom NSS System und nicht von Samba ausgeführt.
Der Slapd lässt sich wie folgt dazu Überreden zu loggen:
# logging # 1 trace function calls # 2 debug packet handling # 4 heavy trace debugging # 8 connection management # 16 print out packets sent and received # 32 search filter processing # 64 configuration file processing # 128 access control list processing # 256 stats log connections/operations/results # 512 stats log entries sent # 1024 print communication with shell backends # 2048 entry parsing loglevel 256
Will man verschiedne Optionen kombinieren, dann addiert man einfach die entsprechenden Werte. Der Wert 256 hat sich für mich am besten bewährt. Allerdings ist der LDAP Server Trotzdem nicht immer wirklich auskunftsfreudig. Er loggt zwar oft Fehlercodes aber keinen Text dazu.
LDAP Error Codes
Da ich nirgends eine Liste gefunden habe, habe ich mir eben selbst eine gemacht. Die werte stammen aus /usr/inlcude/ldap.h. Dort sind diese hexadezimal abgelegt. Der Server logt diese werte aber dezimal. Deshalb habe ich diese auch noch umgerechnet.
| LDAP_SUCCESS | 0x00 | 0 |
| LDAP_OPERATIONS_ERROR | 0x01 | 1 |
| LDAP_PROTOCOL_ERROR | 0x02 | 2 |
| LDAP_TIMELIMIT_EXCEEDED | 0x03 | 3 |
| LDAP_SIZELIMIT_EXCEEDED | 0x04 | 4 |
| LDAP_COMPARE_FALSE | 0x05 | 5 |
| LDAP_COMPARE_TRUE | 0x06 | 6 |
| LDAP_AUTH_METHOD_NOT_SUPPORTED | 0x07 | 7 |
| LDAP_STRONG_AUTH_NOT_SUPPORTED | 0x07 | 8 |
| LDAP_STRONG_AUTH_REQUIRED | 0x08 | 8 |
| LDAP_PARTIAL_RESULTS | 0x09 | 9 |
| LDAP_REFERRAL | 0x0a | 10 |
| LDAP_ADMINLIMIT_EXCEEDED | 0x0b | 11 |
| LDAP_UNAVAILABLE_CRITICAL_EXTENSION | 0x0c | 12 |
| LDAP_CONFIDENTIALITY_REQUIRED | 0x0d | 13 |
| LDAP_SASL_BIND_IN_PROGRESS | 0x0e | 14 |
| LDAP_ATTR_ERROR | ||
| LDAP_NO_SUCH_ATTRIBUTE | 0x10 | 16 |
| LDAP_UNDEFINED_TYPE | 0x11 | 17 |
| LDAP_INAPPROPRIATE_MATCHING | 0x12 | 18 |
| LDAP_CONSTRAINT_VIOLATION | 0x13 | 19 |
| LDAP_TYPE_OR_VALUE_EXISTS | 0x14 | 20 |
| LDAP_INVALID_SYNTAX | 0x15 | 21 |
| LDAP_NAME_ERROR | ||
| LDAP_NO_SUCH_OBJECT | 0x20 | 32 |
| LDAP_ALIAS_PROBLEM | 0x21 | 33 |
| LDAP_INVALID_DN_SYNTAX | 0x22 | 34 |
| LDAP_IS_LEAF | 0x23 | 35 |
| LDAP_ALIAS_DEREF_PROBLEM | 0x24 | 36 |
| LDAP_SECURITY_ERROR | ||
| LDAP_PROXY_AUTHZ_FAILURE | 0x2F | 47 |
| LDAP_INAPPROPRIATE_AUTH | 0x30 | 48 |
| LDAP_INVALID_CREDENTIALS | 0x31 | 49 |
| LDAP_INSUFFICIENT_ACCESS | 0x32 | 50 |
| LDAP_SERVICE_ERROR | ||
| LDAP_BUSY | 0x33 | 51 |
| LDAP_UNAVAILABLE | 0x34 | 52 |
| LDAP_UNWILLING_TO_PERFORM | 0x35 | 53 |
| LDAP_LOOP_DETECT | 0x36 | 54 |
| LDAP_UPDATE_ERROR | ||
| LDAP_NAMING_VIOLATION | 0x40 | 64 |
| LDAP_OBJECT_CLASS_VIOLATION | 0x41 | 65 |
| LDAP_NOT_ALLOWED_ON_NONLEAF | 0x42 | 66 |
| LDAP_NOT_ALLOWED_ON_RDN | 0x43 | 67 |
| LDAP_ALREADY_EXISTS | 0x44 | 68 |
| LDAP_NO_OBJECT_CLASS_MODS | 0x45 | 69 |
| LDAP_RESULTS_TOO_LARGE | 0x46 | 70 |
| LDAP_AFFECTS_MULTIPLE_DSAS | 0x47 | 71 |
| LDAP_OTHER | 0x50 | 80 |
| LDAP_API_RESULT | ||
| LDAP_SERVER_DOWN | 0x51 | 81 |
| LDAP_LOCAL_ERROR | 0x52 | 82 |
| LDAP_ENCODING_ERROR | 0x53 | 83 |
| LDAP_DECODING_ERROR | 0x54 | 84 |
| LDAP_TIMEOUT | 0x55 | 85 |
| LDAP_AUTH_UNKNOWN | 0x56 | 86 |
| LDAP_FILTER_ERROR | 0x57 | 87 |
| LDAP_USER_CANCELLED | 0x58 | 88 |
| LDAP_PARAM_ERROR | 0x59 | 89 |
| LDAP_NO_MEMORY | 0x5a | 90 |

