Skip to content

Instantly share code, notes, and snippets.

@mprymek
Created August 21, 2014 14:11
Show Gist options
  • Save mprymek/e8ab511dba1d204dd130 to your computer and use it in GitHub Desktop.
Save mprymek/e8ab511dba1d204dd130 to your computer and use it in GitHub Desktop.
<SOME_DN>=real user DN...
add-primgroup.ldif:
############################################
dn: <SOME_DN>
changetype: modify
replace: primaryGroupID
primaryGroupID: 513
############################################
command:
# ldbmodify -H /var/db/samba4/private/sam.ldb add-primgroup.ldif
ERR: (Object class violation) "error in module samldb: Object class violation during LDB_MODIFY (65)" on DN <SOME_DN> at block before line 4
Modify failed after processing 0 records
But the user IS member of Domain Users:
# ldbedit -e vim -H /var/db/samba4/private/sam.ldb '(samaccountname=<...>)'
...
memberOf: CN=Domain Users,CN=Users,DC=...,DC=...
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment