Is there any sample Python scripts that create Security Descriptors?

Richard Sharpe realrichardsharpe at gmail.com
Sat Mar 24 17:24:50 MDT 2012


2012/3/7 Amitay Isaacs <amitay at gmail.com>:
> You can look at provision code which creates Security descriptors from SDDL in
>  source4/scripting/python/samba/provision/
>
> For file ACLs, you can check
>  source4/scripting/python/samba/netcmd/ntacl.py
>
> And misc SD utilities
>  source4/scripting/python/samba/sd_utils.py
>
> Python interface for SD is provided by samba.dcerpc.security module.
> You can get python documentation on these modules using pydoc.
>
> PYTHONPATH=<samba-dir>/bin/python pydoc samba.dcerpc.security

OK, that has been very useful.

If I write my own python tests (as a class, presumably) how do I get
access to all the existing classes?

Do I run it as: PYTHONPATH=<samba-dir>/bin/python python my-test-set.py

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list