[Samba] Samba 4 Active Directory Quotas

Greg Zartman gzartman at koozali.org
Sat Dec 27 19:10:22 MST 2014

On Sat, Dec 27, 2014 at 2:43 AM, Rowland Penny <rowlandpenny at googlemail.com>

> Yes, samba4 comes with a script: oLschema2ldif

Humm...  Not liking the errors in this method.  Looking at the ldif, I
think we could rework this so that one could modify the LDAP schema
directly using LDAP syntax.  In my case, I'm using Net::LDAP.   Something
more like this:

dn: CN=systemQuotas,CN=Schema,CN=Configuration,DOMAIN_TOP_DN
objectClass: top
objectClass: classSchema
cn: systemQuotas
name: systemQuotas
ldapDisplayName: systemQuotas
subClassOf: posixAccount
objectClassCategory: 3
mustContain: uidNumber
mayContain: quota
possSuperiors: top

changetype: modify
replace: schemaupdatenow
schemaupdatenow: 1

Partially taken from here:

Need to test this out a bit more and add the quota attribute, but I think
this will ultimately add what I'm after.

> Note that the objectClass in the above ldif is a subclass of
> 'posixAccount' and to use it, you will have to add the 'uid' attribute to
> all users, you do not need to add (and in fact should not) the
> 'posixAccount' objectClass'.

Yup, I did find this objectClass, which I have been using to delineate
Centos (SME Server) users from other users in the active directory.

Thanks Rowland.

Greg J. Zartman
Board Member

Koozali SME Server

SME Server user, contributor, and community member since 2000

More information about the samba mailing list