1 test_smb_conf_setup() {
2 cat basicsmb.smb.conf.template | sed "s|PREFIX|$prefix|g" | sed "s|BUILD_FARM|$pwd|g" > $prefix/lib/smb.conf
3 echo "Setting up smb.conf:"
4 cat $prefix/lib/smb.conf
9 ( echo $password ; echo $password; ) | $prefix/bin/smbpasswd -L -s -a $whoami
11 if [ $status = 0 ]; then
12 echo "smbpasswd correctly set inital password ($password)"
14 echo "smbpasswd failed to set inital password ($password)!"
21 if $prefix/bin/smbclient -U$whoami% -L $host; then
22 echo "smbd listed shares OK"
24 echo "listing shares with smbd failed with $?"
31 if $prefix/bin/smbclient //$host/samba -U$whoami% -c 'ls'; then
32 echo "listed files OK"
34 echo "listing files with smbd failed with $?"
40 test_listfilesauth() {
41 if $prefix/bin/smbclient //$host/samba_2_2 -U$whoami%$password -c 'ls'; then
42 echo "listed files OK"
44 echo "listing files with smbd failed with $?"
51 (test_smb_conf_setup && test_smbpasswd) || exit 1