#!/bin/sh if [ $# -lt 1 ]; then cat <$global_inject_conf UID_WRAPPER_ROOT=1 $smbcontrol winbindd reload-config testit "net_ads_testjoin_initial" check_net_ads_testjoin || failed=$((failed + 1)) # To have both old and older password we do one unnecessary password change: testit "wbinfo_change_secret_initial" \ "$samba_wbinfo" --change-secret --domain="${DOMAIN}" \ || failed=$((failed + 1)) testit "wbinfo_check_secret_initial" \ "$samba_wbinfo" --check-secret --domain="${DOMAIN}" \ || failed=$((failed + 1)) # Create/sync all keytabs testit "net_ads_keytab_sync" test_keytab_create || failed=$((failed + 1)) testit "net_ads_testjoin_after_sync" check_net_ads_testjoin || failed=$((failed + 1)) testit "wbinfo_change_secret_after_sync" \ test_pwd_change "wbinfo_changesecret" \ "$samba_wbinfo --change-secret --domain=${DOMAIN}" \ || failed=$((failed + 1)) testit "wbinfo_check_secret_after_sync" \ "$samba_wbinfo" --check-secret --domain="${DOMAIN}" \ || failed=$((failed + 1)) test_smbclient "Test machine login with the changed secret" \ "ls" "${SMBCLIENT_UNC}" \ --machine-pass || failed=$((failed + 1)) testit "net_ads_testjoin_final" check_net_ads_testjoin || failed=$((failed + 1)) echo "" >$global_inject_conf UID_WRAPPER_ROOT=1 $smbcontrol winbindd reload-config testok "$0" "$failed"