Nilton OS
2018-Jun-14 19:52 UTC
[Samba] Help Python API Samba4 -- Project Web Admin Manager Samba4
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 .............................................................................................. *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"*
Garming Sam
2018-Jun-14 22:08 UTC
[Samba] Help Python API Samba4 -- Project Web Admin Manager Samba4
Basically all of the code using the libraries are either in: samba4/lib/python2.7/site-packages/samba/tests samba4/lib/python2.7/site-packages/samba/netcmd Which is either the test code, or the command line tools. netcmd.user and netcmd.group are the samba-tool commands for manipulating users and groups. Apart from looking at how the code is used, there's just using pydoc on the modules (or calling help(module) in the interpreter) -- which should document most but not necessarily all of its functionality. Cheers, Garming On 15/06/18 07:52, Nilton OS via samba 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 > > > > > .............................................................................................. > *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"*
Rowland Penny
2018-Jun-16 20:08 UTC
[Samba] Help Python API Samba4 -- Project Web Admin Manager Samba4
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
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 >
Apparently Analagous 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