summaryrefslogtreecommitdiff
path: root/source4/scripting
AgeCommit message (Collapse)AuthorFilesLines
2011-09-09samba-tool: Fixed "group" subcommands syntaxGiampaolo Lauria1-4/+4
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Fixed "dsacl" command syntaxGiampaolo Lauria1-1/+1
Removed option from syntax to be consistent w/ the rest of commands Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Fixed "drs" subcommands syntaxGiampaolo Lauria1-8/+17
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Fixed "domain" subcommands syntaxGiampaolo Lauria1-7/+8
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Fixed "spn" command syntaxGiampaolo Lauria1-5/+17
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Fixed "delegation" command syntaxGiampaolo Lauria1-7/+24
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Fixed "time" command synopsisGiampaolo Lauria1-1/+1
"server_name" is an optional parameter added "options" parameter Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Removed "acl" commandGiampaolo Lauria2-36/+0
Removed "acl" command as it has been changed to: "dsacl" and "ntacl" Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Added "ntacl" commandGiampaolo Lauria3-7/+13
Added "ntacl" command to substitute "acl nt" command Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Added "dsacl" commandGiampaolo Lauria3-5/+9
Added "dsacl" command to substitute "acl ds" Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Changed fsmo implementationGiampaolo Lauria1-68/+130
Changed fsmo code to fit the object <action> model Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Expanded acronym descriptionsGiampaolo Lauria9-8/+9
Expanded command acronym descriptions Added footnote for "server connection needed" Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Formatted subcommand list outputGiampaolo Lauria1-1/+2
Formatted output of subcommand list to be a function of the max number of chars in the longest string Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Moved command definition to sambatool commandGiampaolo Lauria2-42/+36
Moved subcommand definition from __init__.py to cmd_sambatool class Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Add long_description and epilog to Command classGiampaolo Lauria1-1/+6
long_description and epilog should now be defined for each command. Their string value will be printed whenever the user invokes the command w/ the -h or --help long_desciption will be printed after the usage statement. epilog will be printed after the options are defined Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Redefined samba-tool as a SuperCommandGiampaolo Lauria2-33/+12
Removed MainCommand class as samba-tool is a SuperCommand Redefined samba-tool as a SuperCommand Fixed error handling in SuperCommand _run Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Removed SuperCommand usage methodGiampaolo Lauria1-7/+0
Removed usage method as it is not being used anywhere Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09samba-tool: Removed attribute name from Command classGiampaolo Lauria1-21/+12
Removed name as it is not used anywhere Moved all the attributes on top of the class declaration Signed-off-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09s4-test: name attribute remove from Command class, so test not requiredAmitay Isaacs1-6/+0
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-09s4-s3-upgrade do not convert min password length as a timeAndrew Bartlett1-1/+1
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Sep 9 01:53:55 CEST 2011 on sn-devel-104
2011-09-08s4-provision: Fill msDS-NC-Replica-Locations attribute in DNS provisioningAmitay Isaacs1-0/+1
This attribute is required by the hosting requirement. [MS_ADTS].pdf 7.1.2.3.1 DC and Application NC Replica Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Sep 8 02:04:51 CEST 2011 on sn-devel-104
2011-09-08s4-provision: Make DNS entries consistent with dns_update scriptAmitay Isaacs1-4/+4
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-08s4-provision: Reworked DNS provisioning to support AD DNS schemaAmitay Isaacs1-114/+435
This changes configure DNS partitions used by AD DNS and populate with relevant entries. This has an advantage that Windows can replicate these partitions and set up dns server using them. In addition, these partitions are used by bind9_dlz module to query zone information directly and do not need to create text database for dynamic zones. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-08s4-provision: Add DNS backend option to provisionAmitay Isaacs1-4/+6
This option is introduced temporarily to test bind9 backend with and without dlz_dlopen module. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-09-08samba-tool: Avoid use of "except .. as" construction introduced in python2.6.Jelmer Vernooij1-2/+3
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Thu Sep 8 00:34:22 CEST 2011 on sn-devel-104
2011-09-07s4-s3-upgrade: convert password age policies to the negative NTTIME formatAndrew Bartlett1-8/+21
This previously caused all accounts to be locked out. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Sep 7 13:44:44 CEST 2011 on sn-devel-104
2011-09-07samba-tool: Add --filter option to ldapcmp to ignore specified attributesAmitay Isaacs1-9/+20
2011-09-07s4-s3-upgrade Handle expected errors, error out on unexpected onesAndrew Bartlett1-3/+5
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Sep 7 02:22:56 CEST 2011 on sn-devel-104
2011-09-07s4-s3-upgrade Fix group member additionAndrew Bartlett1-2/+2
2011-09-05s4-samdb: added a few function comments for pydocAndrew Tridgell1-0/+3
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-05s4-provision: these substitutuons are not used any moreAndrew Tridgell1-4/+1
we now create partitions dynamically Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-09-05s4-s3-upgrade Fix error handling in add_users_to_groupAndrew Bartlett1-2/+5
2011-09-05s4-provision handle a number of invalid but real-world upgrade casesAndrew Bartlett1-9/+36
Real world databass have the wrong account flags (U and W at the same time) and have the wrong group type in group mapping databases. Cope with these. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Sep 5 04:58:09 CEST 2011 on sn-devel-104
2011-09-05s4-provision Fix type error on existing idmap entries in s3 upgradeAndrew Bartlett1-1/+1
This is already a DN object. Andrew Bartlett
2011-09-05s4-provision Use ProvisioningError and the eadbAndrew Bartlett1-5/+5
The eadb flag tells us to avoid using system extended attributes, typcially if we are not running as root (ie, in a test environment). The ProvisioningError class allows us to return failures to the upgrade_from_s3 script which can then be detected correctly by the selftest framework. Andrew Bartlett
2011-09-04s4-provision Allow a missing idmap DB in upgrade.pyAndrew Bartlett1-2/+9
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sun Sep 4 06:34:16 CEST 2011 on sn-devel-104
2011-09-04s4-provision cope with SID_NAME_WKN_GRP mappings in upgrade.pyAndrew Bartlett1-1/+5
Some incorrect LDAP backends have entries with this group type, but due to the pdb_ldap code, we cannot read the group members, and we already skip them in add_group_from_mapping_entry(). Andrew Bartlett
2011-09-01pyldb: added OID_COMPARATOR constantsAndrew Tridgell1-1/+1
This also changes the other constants to remove the LDB_ prefix, which is redundent Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-26s4-provision Use samba.dns_name_to_dnAndrew Bartlett2-2/+6
2011-08-26py-samba3-test: Copy sample database in tempdir before running testAmitay Isaacs1-7/+11
Samba3 python module using passdb api modifies the database files, to upgrade them to latest version. So copy the sample database before running tests on it. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Aug 26 07:04:15 CEST 2011 on sn-devel-104
2011-08-26samba3dump: Update the code using modified samba3 module with passdb apiAmitay Isaacs1-40/+53
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26s3_upgrade: Set lock directory to correct directoryAmitay Isaacs1-0/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26py-samba3-test: Set lock directory to the datadirAmitay Isaacs1-0/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26s3_upgrade: Update commandline options and use updated samba3 python moduleAmitay Isaacs1-144/+75
upgrade_from_s3 script now requires samba3 configuration file and target directory for samba4 database. In addition, it either uses --libdir option or --testparm option to correctly guess the paths for samba3 databases (private dir and state directory). Usage: upgrade_from_s3 [options] <configuration_file> <targetdir> Input arguments are: <configuration_file> - path to existing smb.conf <targetdir> - directory in which samba4 database will be created In addition, specify either samba3 database directory (with --libdir) or samba3 testparm utility (with --testparm). Before using passdb interface, initialize s3 loadparm context using correct path settings for private dir and state directory. Export account policy from s3 to s4. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26py-samba3: Use passdb/param wrapper for samba3 moduleAmitay Isaacs2-567/+117
Instead of parsing samba3 database files (password, group mapping, account policy, secrets), use passdb python wrapper. Similarly for parsing configuration, use samba3 param python wrapper. Other databases (idmap, registry, wins) are still parsed in python. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26s3_upgrade: Let python generate backtrace for unknown exceptionsAmitay Isaacs1-15/+4
Catch known exceptions only. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26s3_upgrade: Add document strings for python methodsAmitay Isaacs1-9/+23
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-25s4-dns: cope with duplicate entries in dns_update_listAndrew Tridgell1-1/+5
this is needed for when DNSFOREST and DNSDOMAIN are the same Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-25s4-join: fixed DNS hostnameAndrew Tridgell1-1/+1
we need the local hostname, not the remote name
2011-08-25s4-join: setup DNS forest name on join contextAndrew Tridgell1-4/+4