source: trunk/server/source4/setup/tests/blackbox_newuser.sh

Last change on this file was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 2.3 KB
Line 
1#!/bin/sh
2
3if [ $# -lt 1 ]; then
4cat <<EOF
5Usage: blackbox_newuser.sh PREFIX
6EOF
7exit 1;
8fi
9
10PREFIX="$1"
11shift 1
12
13. `dirname $0`/../../../testprogs/blackbox/subunit.sh
14
15
16rm -rf $PREFIX/simple-dc
17testit "simple-dc" $PYTHON $SRCDIR/source4/setup/provision --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/simple-dc
18samba_tool="./bin/samba-tool"
19
20CONFIG="--configfile=$PREFIX/simple-dc/etc/smb.conf"
21
22#two test for creating new user
23#newuser account is created with cn=Given Name Initials. Surname
24#newuser1 account is created using cn=username
25testit "newuser" $samba_tool 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:" NewUser testp@ssw0Rd
26testit "newuser" $samba_tool 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:" NewUser1 testp@ssw0Rd
27
28# check the enable account script
29testit "enableaccount" $samba_tool enableaccount $CONFIG NewUser
30testit "enableaccount" $samba_tool enableaccount $CONFIG NewUser1
31
32# check the enable account script
33testit "setpassword" $samba_tool setpassword $CONFIG NewUser --newpassword=testp@ssw0Rd2
34testit "setpassword" $samba_tool setpassword $CONFIG NewUser1 --newpassword=testp@ssw0Rd2
35
36# check the setexpiry script
37testit "noexpiry" $samba_tool setexpiry $CONFIG NewUser --noexpiry
38testit "noexpiry" $samba_tool setexpiry $CONFIG NewUser1 --noexpiry
39testit "expiry" $samba_tool setexpiry $CONFIG NewUser --days=7
40testit "expiry" $samba_tool setexpiry $CONFIG NewUser1 --days=7
41
42exit $failed
Note: See TracBrowser for help on using the repository browser.