5 Usage: blackbox_s3upgrade.sh PREFIX
13 samba4bindir
="$BINDIR"
14 samba_tool
="$samba4bindir/samba-tool"
15 samba_net
="$samba4bindir/net"
16 testparm
="$samba4bindir/testparm"
18 .
`dirname $0`/..
/..
/..
/testprogs
/blackbox
/subunit.sh
20 rm -rf $PREFIX/samba3-upgrade
21 mkdir
-p $PREFIX/samba3-upgrade
22 cp -a $SRCDIR/testdata
/samba3
$PREFIX/samba3-upgrade
25 cat - > $PREFIX/samba3-upgrade
/samba
3/smb1.conf
<<EOF
29 netbiosname = S3UPGRADE
30 passdb backend = tdbsam:$PREFIX/samba3-upgrade/samba3/passdb.tdb
31 private dir = $PREFIX/samba3-upgrade/samba3
32 lock directory = $PREFIX/samba3-upgrade/samba3
33 state directory = $PREFIX/samba3-upgrade/samba3
34 cache directory = $PREFIX/samba3-upgrade/samba3
35 pid directory = $PREFIX/samba3-upgrade/samba3
36 usershare path = $PREFIX/samba3-upgrade/samba3
37 ncalrpc dir = $PREFIX/samba3-upgrade/samba3
42 testit
"samba3-upgrade-member" $samba_tool domain classicupgrade
$PREFIX/samba3-upgrade
/samba
3/smb1.conf
--targetdir=$PREFIX/samba3-upgrade
/s4_1
--dbdir=$PREFIX/samba3-upgrade
/samba3
43 testit
"samba3-upgrade-member-getlocalsid" $samba_net getlocalsid s3upgrade
-s $PREFIX/samba3-upgrade
/s4_
1/etc
/smb.conf
46 cat - > $PREFIX/samba3-upgrade
/samba
3/smb2.conf
<<EOF
49 netbiosname = S3UPGRADE
51 realm = s3.samba.example.com
52 passdb backend = tdbsam:$PREFIX/samba3-upgrade/samba3/passdb.tdb
53 private dir = $PREFIX/samba3-upgrade/samba3
54 lock directory = $PREFIX/samba3-upgrade/samba3
55 state directory = $PREFIX/samba3-upgrade/samba3
56 cache directory = $PREFIX/samba3-upgrade/samba3
57 pid directory = $PREFIX/samba3-upgrade/samba3
58 usershare path = $PREFIX/samba3-upgrade/samba3
59 ncalrpc dir = $PREFIX/samba3-upgrade/samba3
64 mv $PREFIX/samba3-upgrade
/samba
3/wins.dat2
$PREFIX/samba3-upgrade
/samba
3/wins.dat
66 testit
"samba3-upgrade-dc" $samba_tool domain classicupgrade
$PREFIX/samba3-upgrade
/samba
3/smb2.conf
--targetdir=$PREFIX/samba3-upgrade
/s4_2
--dbdir=$PREFIX/samba3-upgrade
/samba3
67 NT4-like domains
in samba3upgrade
68 testit
"samba3-upgrade-dc-getlocalsid" $samba_net getlocalsid samba
-s $PREFIX/samba3-upgrade
/s4_
2/etc
/smb.conf
69 testit
"samba3-upgrade-dc-getdomainsid" $samba_net getdomainsid
-s $PREFIX/samba3-upgrade
/s4_
2/etc
/smb.conf
71 #Run final test without a wins.dat
72 rm -f $PREFIX/samba3-upgrade
/samba
3/wins.dat
74 # Test 3 (s3 dc using testparm hook)
75 cat - > $PREFIX/samba3-upgrade
/samba
3/smb3.conf
<<EOF
78 netbiosname = S3UPGRADE
80 realm = s3.samba.example.com
81 passdb backend = tdbsam:$PREFIX/samba3-upgrade/samba3/passdb.tdb
82 private dir = $PREFIX/samba3-upgrade/samba3
83 lock directory = $PREFIX/samba3-upgrade/samba3
84 state directory = $PREFIX/samba3-upgrade/samba3
85 cache directory = $PREFIX/samba3-upgrade/samba3
86 pid directory = $PREFIX/samba3-upgrade/samba3
87 usershare path = $PREFIX/samba3-upgrade/samba3
88 ncalrpc dir = $PREFIX/samba3-upgrade/samba3
93 testit
"samba3-upgrade-testparm" $samba_tool domain classicupgrade
$PREFIX/samba3-upgrade
/samba
3/smb2.conf
--targetdir=$PREFIX/samba3-upgrade
/s4_3
--testparm=$testparm
94 testit
"samba3-upgrade-testparm-getlocalsid" $samba_net getlocalsid samba
-s $PREFIX/samba3-upgrade
/s4_
3/etc
/smb.conf
95 testit
"samba3-upgrade-testparm-getdomainsid" $samba_net getdomainsid
-s $PREFIX/samba3-upgrade
/s4_
3/etc
/smb.conf
97 rm -rf $PREFIX/samba3-upgrade