make test modules for net group set of commands and modification to the newuser to...
[samba.git] / source4 / setup / tests / blackbox_newuser.sh
index 113b667b592fb2401fd283b38d5c19a78702a353..a295522e6e33f31d36d0e9d9fe824d0e74e3a9aa 100755 (executable)
@@ -18,16 +18,24 @@ net="./bin/net"
 
 CONFIG="--configfile=$PREFIX/simple-dc/etc/smb.conf"
 
-testit "newuser" $net newuser $CONFIG testuser testp@ssw0Rd
+#two test for creating new user
+#newuser  account is created with cn=Given Name Initials. Surname
+#newuser1 account is created using cn=username
+testit "newuser" $net newuser $CONFIG --given-name="User" --surname="Tester" --initials="T" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" testuser testp@ssw0Rd
+testit "newuser" $net newuser $CONFIG --use-username-as-cn --given-name="User1" --surname="Tester1" --initials="UT1" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" testuser1 testp@ssw0Rd
 
 # check the enable account script
 testit "enableaccount" $net enableaccount $CONFIG testuser
+testit "enableaccount" $net enableaccount $CONFIG testuser1
 
 # check the enable account script
 testit "setpassword" $net setpassword $CONFIG testuser --newpassword=testp@ssw0Rd2
+testit "setpassword" $net setpassword $CONFIG testuser1 --newpassword=testp@ssw0Rd2
 
 # check the setexpiry script
 testit "noexpiry" $net setexpiry $CONFIG testuser --noexpiry
+testit "noexpiry" $net setexpiry $CONFIG testuser1 --noexpiry
 testit "expiry" $net setexpiry $CONFIG testuser --days=7
+testit "expiry" $net setexpiry $CONFIG testuser1 --days=7
 
 exit $failed