Is there any sample Python scripts that create Security Descriptors?

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

2012/3/7 Amitay Isaacs <amitay at>:
> 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/
> And misc SD utilities
>  source4/scripting/python/samba/
> Python interface for SD is provided by module.
> You can get python documentation on these modules using pydoc.
> PYTHONPATH=<samba-dir>/bin/python pydoc

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

Richard Sharpe

More information about the samba-technical mailing list