1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

142 Commits

Author SHA1 Message Date
Matthieu Patou
fa591a6d3c devel-scripts: ask with WRIT_REP by default
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-21 22:31:20 +01:00
Matthieu Patou
0755b835cc devel-getncchange: try to find the dest_dsa automatically
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-21 22:31:20 +01:00
Stefan Metzmacher
257ae54436 s4:scripting/python: always treat the highwatermark as opaque (bug #9508)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-01 19:28:06 +01:00
Matthieu Patou
e332f98909 devel-crackname: Print if count > 0 2012-10-07 21:51:01 -07:00
Matthias Dieter Wallnöfer
438971e214 LDB/s4 - do not use the "(dn=...)" syntax on filters anymore
Make it AD-compatible using "(distinguishedName=...)".

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-03-26 00:57:29 +02:00
Amitay Isaacs
1f0298dd1b python: Change except: statement to except Exception:
This way we only catch true exceptions and keyboard interrupts
are not caught here.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue Jan 24 03:32:40 CET 2012 on sn-devel-104
2012-01-24 03:32:40 +01:00
Stefan Metzmacher
15cdbba254 s4:repl_cleartext_pwd.py: add optional 'clear_utf16_name' parameter
Not all cleartext password (machine passwords) can be converted to utf8,
let's export the raw uint16_t array.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jan 12 23:58:12 CET 2012 on sn-devel-104
2012-01-12 23:58:11 +01:00
Stefan Metzmacher
5efe29baed s4:repl_cleartext_pwd.py: add 'attmode' parameter to convert the attname to utf8
metze
2012-01-12 22:15:58 +01:00
Stefan Metzmacher
9a8b72a318 s4:repl_cleartext_pwd.py: correctly compare attids as uint32_t values
metze
2012-01-12 22:12:41 +01:00
Stefan Metzmacher
73d96ed239 s4:scripting/devel: add repl_cleartext_pwd.py script
This is useful to sync passwords from an AD domain.

 $
 $ source4/scripting/devel/repl_cleartext_pwd.py \
 	-Uadministrator%A1b2C3d4 \
 	172.31.9.219 DC=bla,DC=base /tmp/cookie cleartext_utf8 131085 displayName
 # starting at usn[0]
 dn: CN=Test User1,CN=Users,DC=bla,DC=base
 cleartext_utf8: A1b2C3d4
 displayName:: VABlAHMAdAAgAFUAcwBlAHIAMQA=

 # up to usn[16449]
 $
 $ source4/scripting/devel/repl_cleartext_pwd.py \
 	-Uadministrator%A1b2C3d4
 	172.31.9.219 DC=bla,DC=base /tmp/cookie cleartext_utf8 131085 displayName
 # starting at usn[16449]
 # up to usn[16449]
 $

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jan  9 19:06:06 CET 2012 on sn-devel-104
2012-01-09 19:06:06 +01:00
Matthieu Patou
691fb365f8 s4: Simple test script to create lots of contacts to stress the LDB
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Nov 11 22:02:53 CET 2011 on sn-devel-104
2011-11-11 22:02:53 +01:00
Andrew Bartlett
60150323be s4: add createtrust tool for testing 2011-09-13 15:37:12 +10:00
Matthieu Patou
1b97b2f8ff s4: create a small script to test drsuapi/crackname 2011-08-10 01:44:43 +04:00
Matthieu Patou
bb865b4a95 s4-scripting: allow to specify the number max of iteration around getNcChanges 2011-08-06 01:10:12 +04:00
Andrew Tridgell
e593939da1 samba-tool: fixed some more calls to samba_tool join to be 'domain join' 2011-07-21 11:44:38 +10:00
Matthieu Patou
850cca3996 add a demo script for dirsync
Signed-off-by: Andrew Tridgell <tridge@samba.org>

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sat May 21 15:40:26 CEST 2011 on sn-devel-104
2011-05-21 15:40:26 +02:00
Matthieu Patou
6071ed67bf s4-python: move function find_provision_key_parameters to provision namespace as it can be used not only for upgradeprovision 2011-05-21 08:41:07 +02:00
Kamen Mazdrashki
ecc030e289 selftest: Polish selftest-vars.sh a little so it can be used again
Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Sun May  8 22:50:01 CEST 2011 on sn-devel-104
2011-05-08 22:50:01 +02:00
Andrew Bartlett
5439553c96 selftest: Don't specify SELFTEST_TARGET as an env variable
It is much more reliable to specify it as a direct parameter, and this
is needed for the combined 'make test'.

Andrew Bartlett
2011-04-19 16:13:42 +10:00
Andrew Bartlett
4fd6ebf544 selftest: Remove duplication between BUILDIR and BINDIR
Just have BINDIR, and have it default to ./bin

Andrew Bartlett
2011-04-16 11:43:04 +02:00
Andrew Bartlett
7faa3be453 s4-python Ensure we add the Samba python path first.
This exact form of the construction is important, and we match on it
in the installation scripts.

Andrew Bartlett
2011-02-02 15:21:12 +11:00
Kamen Mazdrashki
2ce6e648ed s4-devel/pfm_verify: Move schemaInfo getter into separate function
so it can be used against Windows DC without fetching prefixMap
Fetching prefixMap doesn't work against WinDCs for some reason at the moment

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Wed Dec 22 01:28:49 CET 2010 on sn-devel-104
2010-12-22 01:28:49 +01:00
Kamen Mazdrashki
214b12973d s4-devel/pfm_verify: Extend the tool to verify schemaInfo attribute value 2010-12-18 05:32:14 +02:00
Nadezhda Ivanova
6bb89aaa0d s4-tests: Added a speedtest for LDAP search operations with different accounts.
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Wed Dec 15 21:32:09 CET 2010 on sn-devel-104
2010-12-15 21:32:09 +01:00
Andrew Tridgell
abe9ac53f0 s4-ldapcmp: make ldapcmp a samba-tool command
The ldapcmp tool is very useful, and should be available to Samba
admins, not just developers. This makes it a samba-tool command, which
also gives it the nicer command line handling that samba-tool has
2010-11-29 18:04:42 +11:00
Andrew Tridgell
f8d73e466b s4-ldapcmp: fixed exception handling
This pattern, which is common in our code, is wrong:
            except LdbError, (ERR_NO_SUCH_OBJECT, _):

what it actually does it to change the value of ldb.ERR_NO_SUCH_OBJECT
to be equal to whatever ldb error occurred! This led to some really
bizarre behavior
2010-11-29 18:04:42 +11:00
Jelmer Vernooij
28b509579d chgtdcpass: Fix program name in usage message. 2010-11-28 17:23:27 +01:00
Jelmer Vernooij
498743bd46 show_test_time: Move to root scripting directory as it's useful for s3
and s4.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Nov 27 17:17:29 CET 2010 on sn-devel-104
2010-11-27 17:17:29 +01:00
Nadezhda Ivanova
fc1da86d40 s4-tests: Modified speedtest.py to use samba.tests.delete_force
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Thu Nov 25 01:28:19 CET 2010 on sn-devel-104
2010-11-25 01:28:19 +01:00
Andrew Tridgell
1f478afe22 s4-devel: we don't need to override these scripts now
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov 24 01:02:43 CET 2010 on sn-devel-104
2010-11-24 01:02:43 +01:00
Kamen Mazdrashki
9e24db1f2b s4-pfm_verify: Explicitly pass LoadParm() instance to system_session() function
Otherwise system_session() creates a LoadParm() instance
wich resets certain params to their defaults from smb.conf
("log level" for instance)
2010-11-23 18:01:05 +01:00
Kamen Mazdrashki
6965d1eba5 s4-pfm_verify: fix usage string
Thanks Tridge!
2010-11-22 15:37:39 +02:00
Andrew Tridgell
24e8bc5441 wintest: moved to top level
the plan is to expand wintest to test a lot more of Samba against
windows, including testing the Samba3 file server, winbind, nmbd etc
2010-11-19 15:17:43 +11:00
Andrew Tridgell
58c43f74b9 s4-wintest: reliability and usability improvements
- allow for missing VMs
- improved VM names
- added join of w2k3 to Samba domain
- cope with w2k3 dcpromo output
- wait for port 139 not 23, to avoid windows telnet server bug

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Nov 18 23:56:11 CET 2010 on sn-devel-104
2010-11-18 23:56:11 +01:00
Andrew Tridgell
5be4bfdc37 s4-wintest: remove files in var/ when reprovisioning 2010-11-18 23:12:26 +01:00
Andrew Tridgell
27c3bc8c01 s4-test: added --rebase and --clean options 2010-11-18 23:12:26 +01:00
Andrew Tridgell
498f3c8e5f s4-test: use --fail-immediately for samba_dnsupdate testing 2010-11-18 23:12:26 +01:00
Andrew Tridgell
1c4807a62f s4-test: added greater control over tests to run
now supports --list to list tests, and --skip to skip the named tests

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Nov 18 04:29:24 UTC 2010 on sn-devel-104
2010-11-18 04:29:24 +00:00
Andrew Tridgell
23e053d4a2 s4-test: rename scripting/devel/howto to scripting/devel/wintest
this won't just be for the howto anymore

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Nov 18 00:45:18 UTC 2010 on sn-devel-104
2010-11-18 00:45:18 +00:00
Andrew Tridgell
f6c66cd6ee s4-wintest: added wintest.py library
converted test-howto.py to use the wintest library.

The idea is for us to create other tests that test lots of different
interactions with windows
2010-11-18 10:59:26 +11:00
Andrew Tridgell
6041938908 s4-test: updates to test-howto.py
- handle clock skew using "net time" on windows after we open the
  telnet connection
- allow checking for result lists in order
- replicate all partitions after vampiring so we don't need
  to wait for periodic replication
- use a krb5 ccache in the prefix for kinit based tests

The complete test suite now passes on my system, taking just over 13
minutes to complete
2010-11-17 23:55:39 +11:00
Andrew Tridgell
27df2e544a s4-test: added testing of w2k3 DC join to test-howto.py
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov 17 01:16:19 UTC 2010 on sn-devel-104
2010-11-17 01:16:19 +00:00
Andrew Tridgell
f99403e45a s4-test: fixes for test-howto.py
this fixes some timing issues, plus ensures we test both with and
without kerberos

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Nov 16 07:58:55 UTC 2010 on sn-devel-104
2010-11-16 07:58:55 +00:00
Andrew Tridgell
10a1606baf s4-devel: a script to test the Samba4 HOWTO
This provides a script that allows testing of most of the steps of the
Samba4 HOWTO. The big difference between this and 'make test' is that
it test against windows, using pexpect to control windows boxes via
telnet.

The info about VMs and other parameters are in separate conf
files. I've included a sample config file that I use on my laptop.
2010-11-15 21:45:20 +00:00
Matthias Dieter Wallnöfer
7c59ecec50 s4:speedtest.py - use "unicodePwd" for setting user's password
It's available on all AD hosts (including Windows 2000) and on all configurations!
2010-11-11 09:12:25 +01:00
Matthias Dieter Wallnöfer
0e945697f5 s4:speedtest.py - remove duplicated code 2010-11-11 09:12:25 +01:00
Matthias Dieter Wallnöfer
0a29e552cb s4:speedtest.py - fix script name in the help text 2010-11-11 09:12:25 +01:00
Matthias Dieter Wallnöfer
ed1ca1c49e s4:speedtest.py - make it executable 2010-11-11 09:12:25 +01:00
Andrew Tridgell
60cb372bd6 s4-devel: useful script for testing join with empty smb.conf
this sets up all the needed --options for a join with a prefix other
than the one compiled in
2010-11-11 02:57:04 +00:00
Andrew Tridgell
e59bf5efb5 s4-join: modify join behaviour according to domain level
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sun Nov  7 23:32:16 UTC 2010 on sn-devel-104
2010-11-07 23:32:16 +00:00
Andrew Tridgell
a162b1a2d8 s4-join: switch over to the new DC join in make test 2010-11-06 14:36:26 +11:00
Andrew Tridgell
34ce183d6c s4: net -> samba-tool 2010-11-05 23:42:08 +11:00
Kamen Mazdrashki
e7aa7a0c33 s4-devel: Verify prefixMap is saved correctly in LDB on disk 2010-11-04 12:16:04 +00:00
Zahari Zahariev
832cd99ea7 Speed test with user objects
This is a modest speed test that aims to show performance difference
between Samba4 vs MS Active Directory. It should be used with Samba-style
credentials and no arguments like every other python unittest.

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>

Autobuild-User: Anatoliy Atanasov <anatoliy@samba.org>
Autobuild-Date: Thu Nov  4 00:11:20 UTC 2010 on sn-devel-104
2010-11-04 00:11:20 +00:00
Andrew Tridgell
43f7c9ca26 s4-test: we don't need to set LDB_MODULES_PATH any more 2010-11-01 18:55:19 +11:00
Matthieu Patou
d8e246cf8a Add a script for formating test result of st/subunit
This script show the time of each test and tests are sorted by execution
time (from the slowest to the quickest)

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Tue Oct 26 20:42:11 UTC 2010 on sn-devel-104
2010-10-26 20:42:11 +00:00
Kamen Mazdrashki
197a1514d6 s4-ldapcmp.py: Don't guess credentials for second Credentials object
This allow us to fallback to first credentials given.

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Sat Oct  2 23:05:20 UTC 2010 on sn-devel-104
2010-10-02 23:05:20 +00:00
Zahari Zahariev
73763b3678 LDAPCmp feature to compare nTSecurityDescriptors
New feature that enables LDAPCmp users to find unmatched or
missing ACEs in objects for the three naming contexts between
DCs in one domain (default) or different domains. Comparing
security descriptors is not the default action but attribute
compatison. So to activate the new mode there is --sd switch.
However there are two view modes to the new --sd action which
are 'section' (default) or 'collision'. In 'section' mode you
can only find differences connected to missing or value
unmatched ACEs but not disorder unmatch if ACE values and count
are the same. All of the mentioned differences plus disorder
ACE unmatch you can observe under 'collision' view however
it is more verbose.

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2010-09-30 09:41:20 -07:00
Andrew Tridgell
768df75ed9 s4-devel: added new options to getncchanges script
added --pas, --dest-dsa and --replica-flags options

Pair-Programmed-With: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2010-09-29 16:36:22 -07:00
Kamen Mazdrashki
7e1e7b16f6 s4-ldapcmp: Fix usage of 'paged_search' module for remote LDB connections 2010-09-26 02:25:10 +03:00
Kamen Mazdrashki
9e6fa8553c s4-ldapcmp: Extend ldapcmp to be able to compare more than one context at a time
If no arguments given, ldapcmp will compare all NCs
2010-09-26 02:25:03 +03:00
Kamen Mazdrashki
e3b81c6062 s4-ldapcmp: Enable comparisons between LDBs too
This will enable us to compare two LDBs or and LDB with running
AD server. Comparing LDB against running running server
may come into handy when one want to see if 'net vampire'
command does what it does the right way
2010-09-22 15:07:24 +03:00
Kamen Mazdrashki
0740d0ae85 s4-devel-getncchanges: Add common Samba options as a group to be displayed
Those options are processed but never shown with --help argument
2010-09-21 00:15:23 +03:00
Kamen Mazdrashki
c3489a7918 s4-ldapcmp: Fix options parsing for common Samba options
And also set 'creds2' to be equal to 'creds' in case
username2 paramater is not supplied on cmd line
2010-09-18 15:09:46 +03:00
Andrew Tridgell
90d685afe5 s4-devel: developer script for adding DNS entries via netlogon RPC
this calls the netlogon DsrUpdateReadOnlyServerDnsRecords call to add
DNS entries for a RODC via RPC calls. The call is routed via a IRPC
call to winbind, as winbind is the one with the schannel credential
chaining setup.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-17 19:02:19 +10:00
Andrew Tridgell
331905216a s4-devel: added enumprivs developer script
this enumerates all LSA privileges on a server

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-26 22:50:20 +10:00
Andrew Tridgell
85ebc495f6 s4-devel: added a getncchanges developer script
this allows for command line access to getncchanges

it also provides a good example of calling DRSUAPI interfaces from
python

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-23 15:55:40 +10:00
Zahari Zahariev
5c272b8ce7 Remove place-holders when it is single domain
This patch changes the behavior of LDAPCmp in a single domain
scenario. No place-holders will be applied during comparison
so replication will be fully tested and even the silightest
difference will pop up.

There is a second smaller fix when we compre hosts in different
domains. This fix disables ${SERVERNAME} paace-holder when there
are more then one serevr (domain controller) in the given domain.
2010-08-20 13:52:08 +03:00
Matthieu Patou
7ea70f86ac s4: Add a simple script to change dc password
This script will mostly be used by unit test (blackbox type) to test the
change of the dc password

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Zahari Zahariev
4a0edb597c DNS objects should not be ignored
Recently I have found that after vampireing from a clean Windows
server we have the same DNS objects in the ldb. So ldapcmp has to
no longer ignore them.

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
2010-07-05 18:54:15 +03:00
Kamen Mazdrashki
acebfcb938 s4/test: fix DC password in selftest-vars.sh 2010-06-22 04:50:19 +03:00
Kamen Mazdrashki
242b41a3d8 s4/selftest: fix passwords in selftest-vars script 2010-05-19 02:49:05 +03:00
Zahari Zahariev
658dac9e7e v2 Latest enhancements in ldapcmp tool
- Added support for replicating hosts versus hosts in different domains
- Added switches for the following modes:
  = two - ignores additional attributes that cannot be the same
    in two different provisions (domains)
  = quiet - display nothing, only return code
  = verbose - display all dn objects through compare fase
  = default - display only objects with differences
- Added more placeholders for nETBIOSDomainName and ServerName
2010-05-10 17:24:03 +03:00
Andrew Tridgell
6fd4861d9d s4-devel: a very useful script when dealing with library/linking issues
I use this all the time, so I thought I'd put it in the tree for
others
2010-05-07 15:14:49 +02:00
Andrew Tridgell
e0f602f2c9 s4-devel: auto-delete any leftover IPs
remove IP from a previous vampire_ad.sh run
2010-05-06 15:25:18 +02:00
Andrew Tridgell
9ba08c22e8 s4-devel: a useful script for giving DRS replication demos 2010-05-06 15:25:18 +02:00
Andrew Tridgell
725e48c22c s4-drsdevel: support sites in drs developer scripts 2010-04-27 15:24:40 +10:00
Andrew Tridgell
899fa60dd2 s4-devel: allow extra net command line options and gdb
This allows you to run:

  GDB="gdb --args" vampire_ad.sh

and also to add higher debug levels like this:

  vampire_ad.sh -d100

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-21 13:35:55 +10:00
Andrew Tridgell
5040e2a6fb s4-dev: expanded selftest-vars.sh to match current testenv 2010-04-19 16:34:14 +10:00
Andrew Tridgell
22d7a06522 s4-test: added KRB5_CONFIG to selftest-vars.sh 2010-04-16 14:12:44 +10:00
Andrew Tridgell
088096d1ba python: use '#!/usr/bin/env python' to cope with varying install locations
this should be much more portable
2010-03-25 14:37:19 +11:00
Günther Deschner
0cf9d62f30 s4-selftest: fix selftest-vars script.
Tridge, please check.

Guenther
2010-03-22 10:43:48 +01:00
Andrew Tridgell
c04922ec20 build: useful shell vars for setting up selftest 2010-03-20 16:50:27 +11:00
Andrew Tridgell
c2edea5ccf devel: get the ownership of the directories right in tmpfs.sh 2010-02-26 18:19:27 +11:00
Andrew Bartlett
612eec4aa7 s4:scripting/devel Allow tmpfs script to be re-run
By doing the unmount, we can avoid double-mounting st and bin
2010-02-25 08:26:09 +11:00
Andrew Tridgell
637d50b5d0 s4-devel: added rebuild_zone.sh
This rebuilds a DNS zone file, including all DCs from sam.ldb
2010-01-16 14:10:44 +11:00
Zahari Zahariev
5d1aa4c5b7 Comparison tool for LDAP servers (using Ldb)
This tool is integrated with Samba4 Ldb. It provides a useful output
where you can find easy differences in objects or attributes within
naming context (Domain, Configuration or Schema).

Added functionality for two sets of credentials.
2010-01-13 12:06:17 +02:00
Andrew Tridgell
9672a3d1cc s4-devel: a useful script to setup bin/ and st/ as tmpfs filesystems
this makes building and testing s4 as a developer much faster, if you
have enough memory!
2010-01-08 13:03:03 +11:00
Andrew Tridgell
7f6b524bf6 s4-devel: support vampire_ad.sh with no initial smb.conf 2009-12-14 22:29:58 +11:00
Andrew Tridgell
cc9d4d5181 s4-drs: use -r to ldbdel in unvampire devel script
This ensures we delete any nTDSConnection objects
2009-12-08 14:43:50 +11:00
Andrew Tridgell
b41290c10d s4-devel: for devel scripts its better to use bin/ than $PREFIX/bin
This avoids having to do make install after each change when using the
drs devel scripts
2009-10-15 08:49:21 +11:00
Andrew Bartlett
40b09f689b s4:drs-development Scripts to assist testing of DRS replication with AD
These scripts, originally by tridge, allow developers to easily
reproduce the same domain join senerio time after time.

They need documentation, and the template named.conf and zone files
for hosting an AD domain are not provided.  However, I hope to have
the provision script provide these shortly.

They assume a local 'bind' set up to read PREFIX/private/named.conf
(as per the provision instructions).

Ensure you edit the 'vars' file to match your local setup.

Andrew Bartlett
2009-10-06 11:10:33 +11:00