Re: Joining centos 6.5 member Domain Controller to an existing Windows Domain

2014-05-06 Thread Jerry Hill
On Mon, May 5, 2014 at 11:18 AM, Joshua Knights
 wrote:
>
> Here is my Issue and I think it may be a python path bug?

It's not a bug in Python.  It looks to me like a configuration problem.

I'm going to assume you have a good reason for bypassing your OS's
package management system.  In general, this is a bad idea, but since
this isn't a linux administration list, I'll leave it at that.

> Then I downloaded Samba with the following command:
> git clone git://git.samba.org/samba.git samba-master
> Then I installed the additional openldap-devel Library
> then I did the ./configure --enable-debug --enable-selftest
> then initiated the make command

So you configured it, and built it, but did not install it, right?
You didn't do a make install or make altinstall?  Installing would
presumably have put the files in the right place for them to be picked
up by python.  Since you just built samba without installing it, it
looks like you have to point python to the right place.

> When I do a find / - name samba.netcmd.main
>
> It pulls up: NOTHING!!

Right, that's not surprising.  samba.netcmd.main is a python package,
not a module, so it won't be named samba.netcmd.main.py or whatever
you were thinking.

> If I pull up : find / -name netcmd
>
> I get:
>
> /root/samba-master/python/samba/netcmd
> /root/samba-master/bin/python/samba/netcmd
> /root/samba-master/bin/default/python/samba/netcmd
>
> In my research somebody said: to export the PYTHONPATH and to change it to 
> the correct path of the netcmd command.

You'll want to add the directory up to the "/python" bit.  I'm not
sure which one of those three is really the right location for the
module you're looking for, but I would start by trying
'/root/samba-master/bin/python'.  From there, python should be able to
find the samba package.

> if I wanted to fix it permanently then to update my bash.rc file.
>
> In other words Tell my samba tool where to look, and this look is only 
> temporary till I close my terminal. Placing the command in the bash.rc file 
> will run this script every time I open my terminal. Well, I tried all 3 and 
> none of them worked.

This is not a good way to leave your system.  It's okay if you're just
testing the new samba build, but you really ought to install the
software, not just run it out of the build directory.  Best of all
would be to install a version that's actually been packaged up for
your OS using the CentOS packaging system.

-- 
Jerry
-- 
https://mail.python.org/mailman/listinfo/python-list


Joining centos 6.5 member Domain Controller to an existing Windows Domain

2014-05-05 Thread Joshua Knights
Here is my Issue and I think it may be a python path bug?

This is my Error:
/root/samba-master/bin/samba-tool domain join AAF.ECPI DC -Uadministrator 
--realm=AAF.ECPI I get the following Error: Traceback (most recent call last):
File "/root/samba-master/bin/samba-tool", line 33, in 
from samba.netcmd.main import cmd_sambatool
ImportError: No module named samba.netcmd.main

In my research somebody said: to export the PYTHONPATH and to change it to the 
correct path of the netcmd command.

Someone said this fixed the problem for them, but it did not fix the problem 
for me!!

Below is my Sinereo:

I am running a CentosOS Release 6.5 (Final) Kernel Linux 
2.632-431.11.2.el6.x86_64 GNOME 2.28.2

Both my Domain and Relm are AAF.ECPI;   My Directory Path for Samba Version is 
/root/samba-master/

I did a Yum Update before starting anything

Then I did a:

yum install glibc glibc-devel gcc python* libacl-devel krb5-workstation 
krb5-libs pam_krb5

and then I removed the older samba packages before starting via the command:

yum remove samba-winbind-client samba-common samba-client

Then I installed git core using the command:

yum install git-core

Then I downloaded Samba with the following command:

git clone git://git.samba.org/samba.git samba-master

Then I installed the additional openldap-devel Library

then I did the ./configure --enable-debug --enable-selftest

then initiated the make command

Then I successfully did a:

kinit administrator

and it prompted me for the Administrator Password of the Windows Domain 
Administrator.

Then I ran

klist

and it successfully showed me I had a security token from the Windows Primary 
Domain Controller.

Where I am currently Stuck is when I run the:

/root/samba-master/bin/samba-tool domain join AAF.ECPI DC -Uadministrator 
--realm=AAF.ECPI I get the following Error: Traceback (most recent call last):
File "/root/samba-master/bin/samba-tool", line 33, in 
from samba.netcmd.main import cmd_sambatool
ImportError: No module named samba.netcmd.main


When I do a find / - name samba.netcmd.main

It pulls up: NOTHING!!

If I pull up : find / -name netcmd

I get:

/root/samba-master/python/samba/netcmd
/root/samba-master/bin/python/samba/netcmd
/root/samba-master/bin/default/python/samba/netcmd

In my research somebody said: to export the PYTHONPATH and to change it to the 
correct path of the netcmd command.

if I wanted to fix it permanently then to update my bash.rc file.

In other words Tell my samba tool where to look, and this look is only 
temporary till I close my terminal. Placing the command in the bash.rc file 
will run this script every time I open my terminal. Well, I tried all 3 and 
none of them worked.



---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com
-- 
https://mail.python.org/mailman/listinfo/python-list