[Samba] Provisioning AD DC, MS-AD_Schema_2K8_R2_Attributes.txt Not found

IT Admin it at cliffbells.com
Mon Jan 11 04:43:51 UTC 2016


Wanted to update this thread and mark it as SOLVED, hopefully my notes will
be useful to another user down the road.

My issue was indeed not having the new version of samba in my path, however
I had to add it in two locations other than /etc/profile.d

Appending ":/usr/local/samba/bin:/usr/local/samba/sbin" to the PATH
declaration in /etc/environment and /etc/sudoers allowed me to execute
samba-tool as sudo and provision my domain without errors.

>From here: http://www.jadota.com/2013/01/installing-samba4-on-ubuntu-12-04/

After the install we will add the path to the *bin* and *sbin* directory of
> Samba:
> sudo nano /etc/sudoers
>
> and add the following to the end of the *Defaults secure_path=* before
> the closing *“*:
> :/usr/local/samba/sbin:/usr/local/samba/bin
>
> and write the changes and exit nano.
>
> Make the same change to the system environment PATH variable:
> sudo nano /etc/environment
>
> and add the following to the end of the *PATH*, before the closing *“*:
> :/usr/local/samba/sbin:/usr/local/samba/bin
>
> and write the changes and exit nano.
>

I then had to add an init script to /etc/init.d to start samba at boot and
now I'm good to go.

Thanks for the hints... now to figure out samba_backup

JS


On Fri, Jan 8, 2016 at 9:34 PM, IT Admin <it at cliffbells.com> wrote:

> Hi,
>
> I just removed the Canonical repo's Samba and compiled the latest version
> by running './configure', 'make', and 'sudo make install'.  Everything went
> fine with that process, however, I've run into a snag when attempting to
> provision Samba as an ADC.
>
> I'm getting the following error:
>
> ERROR(<type 'exceptions.IOError'>): uncaught exception - [Errno 2] No such
> file or directory:
> '/usr/share/samba/setup/ad-schema/MS-AD_Schema_2K8_R2_Attributes.txt'
>   File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line
> 175, in _run
>     return self.run(*args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line
> 401, in run
>     use_rfc2307=use_rfc2307, skip_sysvolacl=False)
>   File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py",
> line 2068, in provision
>     schemadn=names.schemadn)
>   File "/usr/lib/python2.7/dist-packages/samba/schema.py", line 88, in
> __init__
>     setup_path('ad-schema/MS-AD_Schema_2K8_R2_Classes.txt'))
>   File "/usr/lib/python2.7/dist-packages/samba/ms_schema.py", line 274, in
> read_ms_schema
>     attr_ldif =  __parse_schema_file(attr_file, "attributeSchema")
>   File "/usr/lib/python2.7/dist-packages/samba/ms_schema.py", line 260, in
> __parse_schema_file
>     f = open(filename, "rU")
>
>
> I have the required file:
>
> itwerks at filer:~$ locate ad-schema
> /home/itwerks/samba-4.3.3/bin/default/source4/setup/ad-schema
> /home/itwerks/samba-4.3.3/source4/setup/ad-schema
>
> /home/itwerks/samba-4.3.3/source4/setup/ad-schema/MS-AD_Schema_2K8_Attributes.txt
>
> /home/itwerks/samba-4.3.3/source4/setup/ad-schema/MS-AD_Schema_2K8_Classes.txt
>
> /home/itwerks/samba-4.3.3/source4/setup/ad-schema/MS-AD_Schema_2K8_R2_Attributes.txt
>
> /home/itwerks/samba-4.3.3/source4/setup/ad-schema/MS-AD_Schema_2K8_R2_Classes.txt
> /home/itwerks/samba-4.3.3/source4/setup/ad-schema/licence.txt
> /usr/local/samba/share/setup/ad-schema
> /usr/local/samba/share/setup/ad-schema/MS-AD_Schema_2K8_Attributes.txt
> /usr/local/samba/share/setup/ad-schema/MS-AD_Schema_2K8_Classes.txt
> /usr/local/samba/share/setup/ad-schema/MS-AD_Schema_2K8_R2_Attributes.txt
> /usr/local/samba/share/setup/ad-schema/MS-AD_Schema_2K8_R2_Classes.txt
>
>
> How do I fix this?
>
> Thanks,
>
> JS
>


More information about the samba mailing list