[Samba] samba-tool domain provision --use-rfc2307 --interactive fail

Rowland penny rpenny at samba.org
Wed Jul 27 15:59:20 UTC 2016


On 27/07/16 16:14, L.P.H. van Belle wrote:
> Ok tomas.
>
> For a good removal of all samba packages.
>
> 1) for x in `dpkg -l | grep samba` ; do apt-get remove --purge $x ; done
> 2) apt-get remove --purge winbind
>
> That should clear all packages of samba.
>
> When thats done. Try the install again.
>
> Greetz,
>
> Louis
>
>
>
>
>
>> -----Oorspronkelijk bericht-----
>> Van: Thomas Massip [mailto:thomas.massip at e-tera.com]
>> Verzonden: woensdag 27 juli 2016 17:11
>> Aan: L.P.H. van Belle
>> Onderwerp: Re: [Samba] samba-tool domain provision --use-rfc2307 --
>> interactive fail
>>
>> Le 2016-07-27 16:12, L.P.H. van Belle a écrit :
>>> Hai.
>>>
>>>
>>>> DNS forwarder IP address (write 'none' to disable forwarding)
>>>> [127.0.1.1]:
>>> Means to me you installed with a DHCP ip and you didn't correct the
>>> /etc/hosts file.
>>>
>> /etc/hosts:
>>
>> 127.0.0.1	localhost
>> 192.168.4.143	kickseed.domaintest.lan	kickseed
>>
>> I think he is correct.
>>
>>
>>> Second, you are running which os?
>> Ubuntu 14.04.4 LTS
>>
>>
>>> And you installed samba from the distro first?
>> Yes, I install samba before but i purge it with 'sudo apt-get remove
>> --purge samba'
>>
>> Regards,
>>
>> Thomas.
>>
>>> You probely missed some files in removal.
>>>
>>> Check these things first please.
>>>
>>>
>>> Greetz,
>>>
>>> Louis
>>>
>>>
>>>> -----Oorspronkelijk bericht-----
>>>> Van: samba [mailto:samba-bounces at lists.samba.org] Namens Thomas Massip
>>>> Verzonden: woensdag 27 juli 2016 15:35
>>>> Aan: samba at lists.samba.org
>>>> Onderwerp: [Samba] samba-tool domain provision --use-rfc2307
>>>> --interactive
>>>> fail
>>>>
>>>> Hi all,
>>>>
>>>> I try to install a samba4 AD DC, but when I try:
>>>>
>>>> samba-tool domain provision --use-rfc2307 --interactive I have this:
>>>>
>>>> Realm [DOMAINTEST.LAN]:
>>>>    Domain [DOMAINTEST]:
>>>>    Server Role (dc, member, standalone) [dc]:
>>>>    DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE)
>>>> [SAMBA_INTERNAL]:
>>>>    DNS forwarder IP address (write 'none' to disable forwarding)
>>>> [127.0.1.1]:
>>>> Administrator password:
>>>> Retype password:
>>>> Looking up IPv4 addresses
>>>> More than one IPv4 address found. Using 192.168.4.143
>>>> Looking up IPv6 addresses
>>>> No IPv6 address will be assigned
>>>> 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
>>>> 442, in run
>>>>       nosync=ldap_backend_nosync, ldap_dryrun_mode=ldap_dryrun_mode)
>>>>     File
>>>> "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py",
>>>> line 2077, 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")
>>>>
>>>>
>>>> The path
>>>> /usr/share/samba/setup/ad-schema/MS-AD_Schema_2K8_R2_Attributes.txt is
>>>> wrong.
>>>>
>>>> locate ad-schema
>>>> /usr/src/samba/bin/default/source4/setup/ad-schema
>>>> /usr/src/samba/source4/setup/ad-schema
>>>> /usr/src/samba/source4/setup/ad-schema/MS-AD_Schema_2K8_Attributes.txt
>>>> /usr/src/samba/source4/setup/ad-schema/MS-AD_Schema_2K8_Classes.txt
>>>> /usr/src/samba/source4/setup/ad-schema/MS-
>> AD_Schema_2K8_R2_Attributes.txt
>>>> /usr/src/samba/source4/setup/ad-schema/MS-AD_Schema_2K8_R2_Classes.txt
>>>> /usr/src/samba/source4/setup/ad-schema/licence.txt
>>>>
>>>> So how can I change this ?
>>>>
>>>> Regards,
>>>>
>>>> Thomas
>>>>
>>>>
>>>>
>>>> --
>>>> To unsubscribe from this list go to the following URL and read the
>>>> instructions:  https://lists.samba.org/mailman/options/samba
>> --
>> Thomas MASSIP - Alternant Ingenieur réseau
>> SAEM e-tera
>> 46 rue Sere de rivieres 81000 ALBI
>>
>> email: thomas.massip at e-tera.com
>
>

It probably requires the env PATH setting changing

Open a terminal and type 'echo $PATH'
If the path it returns doesn't include where the Samba binaries are 
(usually /usr/local/samba/bin & /usr/local/samba/sbin if self compiled) 
then there is the problem.

You will need to check your distros documentation to find out how to 
make it permanent, but if you type 'export 
PATH=/usr/local/samba/bin:/usr/local/samba/sbin:$PATH' it will allow you 
to run the correct samba-tool

Rowland




More information about the samba mailing list