mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
00d22122e5
+ Add a new ldapcmp_restoredc.sh test that asserts that the original DC backed up (backupfromdc) matches the new restored DC. + Add a new join_ldapcmp.sh test that asserts we can join a given DC, and that the resulting DB matches the joined DC + Add a new login_basics.py test that sanity-checks Kerberos and NTLM user login works. (This reuses the password_lockout base code, without taking as long as the password_lockout tests do). Basic LDAP and SAMR connections are also tested as a side-effect. + run the netlogonsvc test against the restored DC to prove we can establish a netlogon connection. + run the same subset of rpc.echo tests that we do for RODC + run dbcheck over the new testenvs at the end of the test run Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
42 lines
1.0 KiB
Bash
Executable File
42 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
# Does a join against the testenv's DC and then runs ldapcmp on the resulting DB
|
|
|
|
. `dirname $0`/subunit.sh
|
|
|
|
TARGET_DIR="$PREFIX_ABS/join_$SERVER"
|
|
|
|
cleanup_output_dir()
|
|
{
|
|
if [ -d $TARGET_DIR ]; then
|
|
rm -fr $TARGET_DIR
|
|
fi
|
|
}
|
|
|
|
SAMBA_TOOL="$PYTHON $BINDIR/samba-tool"
|
|
|
|
join_dc() {
|
|
JOIN_ARGS="--targetdir=$TARGET_DIR --server=$SERVER -U$USERNAME%$PASSWORD"
|
|
$SAMBA_TOOL domain join $REALM dc $JOIN_ARGS --option="netbios name = TESTJOINDC"
|
|
}
|
|
|
|
ldapcmp_result() {
|
|
DB1_PATH="tdb://$PREFIX_ABS/$SERVER/private/sam.ldb"
|
|
DB2_PATH="tdb://$TARGET_DIR/private/sam.ldb"
|
|
|
|
# interSiteTopologyGenerator gets periodically updated. With the restored
|
|
# testenvs, it can sometimes point to the old/deleted DC object still
|
|
$SAMBA_TOOL ldapcmp $DB1_PATH $DB2_PATH --filter=interSiteTopologyGenerator
|
|
}
|
|
|
|
cleanup_output_dir
|
|
|
|
# check that we can join this DC
|
|
testit "check_dc_join" join_dc
|
|
|
|
# check resulting DB matches server DC
|
|
testit "new_db_matches" ldapcmp_result
|
|
|
|
cleanup_output_dir
|
|
|
|
exit $failed
|