IT Admin
2016-Jan-09 02:34 UTC
[Samba] Provisioning AD DC, MS-AD_Schema_2K8_R2_Attributes.txt Not found
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
Andrew Bartlett
2016-Jan-10 20:41 UTC
[Samba] Provisioning AD DC, MS-AD_Schema_2K8_R2_Attributes.txt Not found
On Fri, 2016-01-08 at 21:34 -0500, IT Admin 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.> How do I fix this?My guess is you have some mix of packaged and from-source builds. Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
Rowland penny
2016-Jan-10 21:18 UTC
[Samba] Provisioning AD DC, MS-AD_Schema_2K8_R2_Attributes.txt Not found
On 10/01/16 20:41, Andrew Bartlett wrote:> On Fri, 2016-01-08 at 21:34 -0500, IT Admin 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. >> How do I fix this? > My guess is you have some mix of packaged and from-source builds. > > Andrew Bartlett >I'll take your guess Andrew and raise it with, the OP probably hasn't set the path to his compiled version i.e. echo "PATH=/usr/local/samba/bin:/usr/local/samba/sbin:\$PATH" > /etc/profile.d/samba4.sh export PATH=/usr/local/samba/bin:/usr/local/samba/sbin:$PATH he seems to be still trying to use his original Samba. Rowland
IT Admin
2016-Jan-10 21:47 UTC
[Samba] Provisioning AD DC, MS-AD_Schema_2K8_R2_Attributes.txt Not found
I ran apt-get remove --purge samba. What is the proper procedure to remove it? I've moved past this particular error by copying the files to that location but have hit a new snag, how do I completely wipe out all traces of the old packages? JS On Jan 8, 2016 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 >
Rowland penny
2016-Jan-10 22:05 UTC
[Samba] Provisioning AD DC, MS-AD_Schema_2K8_R2_Attributes.txt Not found
On 10/01/16 21:47, IT Admin wrote:> I ran apt-get remove --purge samba. > > What is the proper procedure to remove it? > > I've moved past this particular error by copying the files to that location > but have hit a new snag, how do I completely wipe out all traces of the old > packages? > >You don't actually have to remove the distro packages, you just have to ensure that the compiled binaries etc are found first, see my earlier post. If you want to use winbind in /etc/nsswitch.conf, you will need to delete the libnss_winbind files and create new links, see here for info: https://wiki.samba.org/index.php/Libnss_winbind_links Rowland
IT Admin
2016-Jan-11 04:43 UTC
[Samba] Provisioning AD DC, MS-AD_Schema_2K8_R2_Attributes.txt Not found
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 >
Rowland penny
2016-Jan-11 09:11 UTC
[Samba] Provisioning AD DC, MS-AD_Schema_2K8_R2_Attributes.txt Not found
On 11/01/16 04:43, IT Admin wrote:> 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.dThought so, your problem was that you ran 'samba-tool' with sudo.> > 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/binYou do not actually have to do this, all the files in samba/bin and samba/sbin are executable by *anybody*, just don't use sudo and definitely don't give anybody an admin password that you do not trust.>> >> 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/binI am afraid you are wrong again :-) If you are going to add them, add them at the start, this way they will be found *before* any other earlier versions.>> 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.There was probably already one there, it ust wanted the paths changing.> > Thanks for the hints... now to figure out samba_backupbacking up samba is easy, restoring it is another thing altogether :-) Rowland> JS > > >