testsuite: give the testuser administrative rights in selftest.sh
authorMichael Adam <obnox@samba.org>
Fri, 4 Apr 2008 16:29:44 +0000 (18:29 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 6 May 2008 10:26:14 +0000 (12:26 +0200)
(by adding him to builtin\administrators)

Michael

source/script/tests/selftest.sh

index 26dd0cbbee91d3747e9f4c474307fe2fb34daf67..5cec6d6d03e45549b095d6dbe4e18d9547628c69 100755 (executable)
@@ -254,6 +254,7 @@ SOCKET_WRAPPER_DEFAULT_IFACE=2
 export SOCKET_WRAPPER_DEFAULT_IFACE
 samba3_check_or_start
 
+
 # ensure any one smbtorture call doesn't run too long
 # and smbtorture will use 127.0.0.6 as source address by default
 SOCKET_WRAPPER_DEFAULT_IFACE=6
@@ -292,6 +293,15 @@ START=`date`
  bin/smbclient $CONFIGURATION -L $SERVER_IP -U% -p 139 | head -2
  MAKE_TEST_BINARY=""
 
+ MAKE_TEST_BINARY="bin/net"
+ printf "%s" "GIVING USER ${USERNAME} ADMINISTRATIVE RIGHTS..."
+ bin/net -s $SERVERCONFFILE sam createbuiltingroup \
+   Administrators > /dev/null 2>&1 ||  exit 1
+ bin/net -s $SERVERCONFFILE sam addmem \
+   BUILTIN\\Administrators $USERNAME > /dev/null 2>&1 || exit 1
+ echo "DONE"
+ MAKE_TEST_BINARY=""
+
  failed=0
 
  . $SCRIPTDIR/tests_$SUBTESTS.sh