Nilton OS
2018-Jun-18 02:42 UTC
[Samba] Help Python API Samba4 -- Project Web Admin Manager Samba4
Hi, Rowland Quick start: https://github.com/jniltinho/go-samba4/blob/master/README.md Debian 9 64Bits Soon I will change the entire documentation to English. You can access the demo application at the following link: https://35.196.196.235/ LOGIN: administrator PASS: Linuxpro123456 https://github.com/jniltinho/go-samba4 .............................................................................................. *Nilton OS* <http://nilton.branded.me> | *Linux Expert 17 years ago* | LinuxPro <http://www.linuxpro.com.br> The meaning of life is to cross borders *"Cert: LPIC-1, SUSE SCLA, ITILv3 2011"* 2018-06-16 17:08 GMT-03:00 Rowland Penny via samba <samba at lists.samba.org>:> On Thu, 14 Jun 2018 16:52:17 -0300 > Nilton OS via samba <samba at lists.samba.org> wrote: > > > Hello everyone, > > > > I would like to know how to use the Python api to manage user and > > groups in samba4. > > I'm developing a samba4 admin web interface I'd like some examples of > > how to interact with the libs in python that are in that folder: > > samba4/lib/python2.7/site-packages and samba4/lib/python2.7/site- > > packages/samba > > > > > > This is the project I am developing. > > https://github.com/jniltinho/go-samba4 > > > > Four questions: > > Why are you using a self compiled Samba ? Especially into a non > standard location. > > Why have you compiled go_samba4 > > Why doesn't it work, I suspect it is because I am trying to use it with > a distro Samba package, but I refer back to the question above. > > I get: > > ./go_samba4 --server-prod --ssl > Traceback (most recent call last): > File "go_samba4.py", line 30, in <module> > File "/tmp/pip-build-hPjfl7/pyinstaller/PyInstaller/loader/pyimod03_importers.py", > line 396, in load_module > File "app/__init__.py", line 31, in <module> > File "/tmp/pip-build-hPjfl7/pyinstaller/PyInstaller/loader/pyimod03_importers.py", > line 396, in load_module > File "app/views/default.py", line 12, in <module> > File "/tmp/pip-build-hPjfl7/pyinstaller/PyInstaller/loader/pyimod03_importers.py", > line 396, in load_module > File "app/model/auth/auth_base.py", line 7, in <module> > ImportError: No module named samba > [6737] Failed to execute script go_samba4 > > Why are you calling it 'go_samba4', at least drop the '4' > > Rowland > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >
Rowland Penny
2018-Jun-18 07:19 UTC
[Samba] Help Python API Samba4 -- Project Web Admin Manager Samba4
On Sun, 17 Jun 2018 23:42:35 -0300 Nilton OS <jniltinho at gmail.com> wrote:> Hi, Rowland > > Quick start: > https://github.com/jniltinho/go-samba4/blob/master/README.md > > Debian 9 64Bits > > Soon I will change the entire documentation to English. > You can access the demo application at the following link: > https://35.196.196.235/ > LOGIN: administrator > PASS: Linuxpro123456 > > > https://github.com/jniltinho/go-samba4 > >OK, as you do not seem to want to answer my questions, I will speak bluntly: You are tying your users into compiling Samba themselves, even though there are perfectly good Debian packages available. Your project is more likely to be used if it could be used with any installed Samba AD DC. At the moment, it will not work with an already installed and provisioned Samba AD DC, I get this: ./go_samba4 --server-prod --ssl Traceback (most recent call last): File "go_samba4.py", line 30, in <module> File "/tmp/pip-build-hPjfl7/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module File "app/__init__.py", line 31, in <module> File "/tmp/pip-build-hPjfl7/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module File "app/views/default.py", line 12, in <module> File "/tmp/pip-build-hPjfl7/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module File "app/model/auth/auth_base.py", line 7, in <module> ImportError: No module named samba [21535] Failed to execute script go_samba4 I think I know what the problem is, but I cannot even attempt to try and fix it, because 'go_samba4' is a binary BLOB I am sorry, but I cannot recommend any opensource project if it relies on a binary BLOB, especially one that is 30.2 MB in size. I still think 'go-samba4' is a pretty poor name, especially as it doesn't seem to be written in 'go' any more, also what are you going to do when Samba hits version 5 ? Rowland
Rowland Penny
2018-Jun-18 10:50 UTC
[Samba] Help Python API Samba4 -- Project Web Admin Manager Samba4
On Mon, 18 Jun 2018 06:46:44 -0300 Nilton OS <jniltinho at gmail.com> wrote:> Hi Rowalnd, > > Could you answer some questions? > > 1 - What Linux distribution are you running?Devuan Ascii (in case you don't know, Debian Stretch without systemd)> 2 - Which version of samba4 is installed?4.8.2 from Louis Van Belle's repo> 3 - What is the path of samba4?/var/lib/samba /usr/sbin and so on> 4 - Can you tell where this path > is /opt/samba4/lib/python2.7/site-packages in this environment where > you are testing?That's easy, it does not exist, but, I do have '/usr/lib/python2.7/dist-packages' and in that dir there is another dir called 'samba' Rowland
Rowland Penny
2018-Jun-18 10:58 UTC
[Samba] Help Python API Samba4 -- Project Web Admin Manager Samba4
On Mon, 18 Jun 2018 07:13:01 -0300 Nilton OS <jniltinho at gmail.com> wrote:> Hi Rowland, > > I think I know what the problem is, but I can not even try to try > and fix it, because 'go_samba4' is a binary BLOB. > > *Right, I created this package with Pyinstaller so the user does not > need to install any python lib for the application to work, but you > can fix it directly on github.*BAD IDEA, just tell people what to install.> > I am sorry, but I can not recommend any opensource project if it > relies on a binary BLOB, especially one that is 30.2 MB in size. > > *At that point I needed to deliver something functional, I'm starting > development, this will change throughout the project.*Yes, I understand this, but better to start right in the first place ;-) If people cannot read your code, they cannot point out errors or supply better ways of doing things, it falls on you and that way usually leads to failure.> > I still think 'go-samba4' is a very poor name, especially as it > does not seem to be written in 'go' any more, also what are you going > to of when Samba hits version 5? > > *The goal of the project is that it is easy to install for the end > user, no matter if it is developed in Golang or Pyton, I will soon > change it to Golang, but first I need to create the Python API in > JSON to interact with the libs of Samba.*I wouldn't bother with 'go', I would stick with python, it must be easier to link your python to our python in the 'samba' libs.> You could test again, as I made some changes to calls to the Samba > libs, this should correct this error.Unless you can provide me with python code for the 'go_samba4' blob, I do not think I will bother, I like to see the code I am running, even if I don't fully understand it ;-) Rowland
Seemingly Similar Threads
- Help Python API Samba4 -- Project Web Admin Manager Samba4
- Help Python API Samba4 -- Project Web Admin Manager Samba4
- Help Python API Samba4 -- Project Web Admin Manager Samba4
- smb_set_file_dosmode error: BUG after update to samba4-4.4.2
- smb_set_file_dosmode error: BUG after update to samba4-4.4.2