[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>
wrote:

> 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
governsID: 1.3.6.1.4.1.19937.1.2.1
cn: systemQuotas
name: systemQuotas
ldapDisplayName: systemQuotas
subClassOf: posixAccount
objectClassCategory: 3
mustContain: uidNumber
mayContain: quota
defaultObjectCategory:
CN=systemQuotas,CN=Schema,CN=Configuration,DOMAIN_TOP_DN
possSuperiors: top
-

dn:
changetype: modify
replace: schemaupdatenow
schemaupdatenow: 1

Partially taken from here:
http://msdn.microsoft.com/en-us/library/cc223302.aspx

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
www.koozali.org

SME Server user, contributor, and community member since 2000


More information about the samba mailing list