 samba-schema: PEN OIDs and date syntax

Use assigned enterprise OIDs, linuxmusterverein PEN prefix:

  1.3.6.1.4.1.47512

Chosen sophomorix sub ID numberspace is

  1.3.6.1.4.1.47512.1

Other projects can use number greater then 1.

Also change the oMSyntax of date attributes from 23 to 24 which is what
MS-AD uses for date attributes like whenChanged.

Syntax is:

  YYYYMMDDHHMM+0x00

where x denotes the timezone offset.

It's also possible to add a seconds fraction, eg

  YYYYMMDDHHMM.F+0x00

Example

  20160429115500+0100

For GMT time skip the timezone diff and append Z for zero, eg

  20160429115500Z

Signed-off-by: Ralph Boehme <slow@samba.org>

Search Flags:

128: confidential, for admins only
see https://msdn.microsoft.com/en-us/library/ms679765(v=vs.85).aspx


Anleitung:
############################################################
(- Pfad zu den AD Datenbanken suchen: # find /var -name sam.ldb)

- Backup der AD Datenbanken, /path/to/dbs/ durch Pfad aus Schritt 1 ersetzen:
  # find /var/lib/samba/private -name '*.ldb' -exec tdbbackup {} \; 

- # alt: /etc/init.d/samba stop   (Samba stoppen)
  systemctl stop samba-ad-dc      (Samba stoppen)

- Schema Änderungen mit Script, base dn DOMAIN NAME anpassen:

  (# tar xzf sophomorix.tgz)
  (# cd sophomorix)
  # ./sophomorix_schema_add.sh DC=DOMAIN,DC=NAME . -H /var/lib/samba/private/sam.ldb -writechanges

  # alt: /etc/init.d/samba start   (Samba starten)
- systemctl start samba-ad-dc    (Samba starten)

Backup einspielen:

- # alt: /etc/init.d/samba stop      (Samba stoppen)
  systemctl stop samba-ad-dc      (Samba stoppen)

- Backup der AD Datenbanken zurückkopieren:
  find /var/lib/samba/private -name '*.ldb' -exec echo cp {}.bak {} \; 

- # alt: /etc/init.d/samba start     (Samba starten)     
  systemctl stop samba-ad-dc      (Samba stoppen)