Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm testing out our samba 4 migration process and when the initial forest/domain was created, it was created without using --use-rfc2307:

sudo samba-tool domain provision \
              --domain netdirect \

Now that it's in place and we have machines joined, what do I need to do to add the unix attributes and NIS maps to an existing samba4 domain so that we can use the rfc2307 features?

share|improve this question
up vote 2 down vote accepted

The schema extensions from ypServ30.ldif must be added:

$ kinit administrator@AD.NETDIRECT.CA
Password for administrator@AD.NETDIRECT.CA

$ sed -e 's/${DOMAINDN}/dc=AD,dc=NETDIRECT,dc=CA/g'  \
      -e 's/${NETBIOSNAME}/NETDIRECT/g'              \
      -e 's/${NISDOMAIN}/NETDIRECT/g'                \
      /usr/share/samba/setup/ypServ30.ldif | ldbmodify -H ldap:// --option="dsdb:schema update allowed=true" -k yes -i
Modified 55 records successfully

Then, add to the [global] section of /etc/samba/smb.conf:

idmap_ldb:use rfc2307 = yes

Restart samba (smbcontrol all reload-config) and you should be good to go.

(Thanks to Rowland Penny for the initial directions)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.