summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2015-11-30 14:24:06 +1300
committerGarming Sam <garming@samba.org>2015-11-30 03:49:25 +0100
commit576b92abc32ab74a256fb42820219be428bfae03 (patch)
tree8b2822d49341e5c5aaeb488eec71c729c7b7c539 /testprogs
parent1c9117746b616fcb8ab251834888b57c4a1c29bf (diff)
downloadsamba-576b92abc32ab74a256fb42820219be428bfae03.tar.gz
pdb: add a blackbox test for setting password with hash
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/blackbox/test_pdbtest.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/testprogs/blackbox/test_pdbtest.sh b/testprogs/blackbox/test_pdbtest.sh
index 017116c206e..e29df7511cd 100755
--- a/testprogs/blackbox/test_pdbtest.sh
+++ b/testprogs/blackbox/test_pdbtest.sh
@@ -98,6 +98,13 @@ testit "modify user - disable password expiry" $VALGRIND $net sam set pwnoexp $
test_smbclient "Test login with no expiry (ntlm)" 'ls' -k no -U$USER%$NEWUSERPASS || failed=`expr $failed + 1`
+NEWUSERPASS=testPaSS@03%
+NEWUSERHASH=062519096c45739c1938800f80906731
+
+testit "Set user password with password hash" $VALGRIND $pdbedit -u $USER --set-nt-hash $NEWUSERHASH $@ || failed=`expr $failed + 1`
+
+test_smbclient "Test login with new password (from hash)" 'ls' -k no -U$USER%$NEWUSERPASS || failed=`expr $failed + 1`
+
testit "del user" $VALGRIND $pdbedit -x $USER $@ || failed=`expr $failed + 1`
rm ./tmpsmbpasswdscript