[Samba] schema enhancement recommandation?

Rowland Penny rpenny at samba.org
Mon Sep 10 17:18:23 UTC 2018


On Mon, 10 Sep 2018 18:59:59 +0200
Oliver Rath via samba <samba at lists.samba.org> wrote:

> Hi list,
> 
> Im using Samba 4.x (x >=8) and Im excited about the new "samba-tool
> computer" simplification of computer managment in AD mode.
> 
> Now I would like to use some more information tagsĀ  in the computer
> section, i.e. partition information or macadress of the nic.
> 
> So I tried to enhance the schema (using 4.10.0pre1-GIT-8c00c017cb5)
> i.e. simple with
> 
> >>> cat win.ldif
> 
> dn: CN=DEMO-01,CN=Computers,DC=dmiserver,DC=lan
> objectClass: top
> objectClass: person
> objectClass: organizationalPerson
> objectClass: user
> objectClass: computer
> CN: DEMO-01
> name: DEMO-01
> userAccountControl: 4096
> sAMAccountName: DEMO-01$
> operatingSystem: Windows 8.1 Professional Volume
> operatingSystemVersion: 6.3 (9600)
> 
> which worked fine:
> 
> >>> ldbadd -H /var/lib/samba/private/sam.ldb < win.ldif
> Added 1 records successfully
> 
> *BUT*
> 
> Using an attribute (which seems not to be in schema, I guess), it
> fails:
> 
> >>> cat win.ldif
> 
> dn: CN=DEMO-02,CN=Computers,DC=dmiserver,DC=lan
> objectClass: top
> objectClass: person
> objectClass: organizationalPerson
> objectClass: user
> objectClass: computer
> CN: DEMO-02
> name: DEMO-02
> userAccountControl: 4096
> sAMAccountName: DEMO-02$
> operatingSystem: Windows 8.1 Professional Volume
> operatingSystemVersion: 6.3 (9600)
> macaddress: aa:bb:cc:dd:ee:ff
> 
> it fails with:
> 
> >>> ldbadd -H /var/lib/samba/private/sam.ldb < win.ldif
> ERR: Object class violation : "objectclass_attrs: attribute
> 'macAddress' on entry 'CN=DEMO-02,CN=Computers,DC=dmiserver,DC=lan'
> does not exist in the specified objectclasses!" on DN
> CN=DEMO-02,CN=Computers,DC=dmiserver,DC=lan at block before line 13
> Add failed after processing 0 records
> 

The possible answer is in the error message. The attribute is actually
'macAddress' and its objectclass is 'ieee802Device', so if you add the
objectclass and fix the syntax it may work.

Rowland




More information about the samba mailing list