if [ $whoami != "root" ]; then exit 0; fi . basicsmb.fns test_joindomain_nt4() { smbpasswd -a -m buildfarm$ echo $prefix/bin/smbpasswd -L -j TESTWG $prefix/bin/smbpasswd -L -j TESTWG status=$? if [ $status = 0 ]; then echo "smbpasswd correctly joined the domain ($workgroup)" else echo "smbpasswd failed to join the domain ($workgroup)! (status $status)" return 1 fi return 0 } password=samba security=DOMAIN (test_smb_conf_setup && test_smbpasswd $password ) || exit 1 test_joindomain_nt4 $password || exit 1 test_listfilesauth $security || exit 1 test_listfilesnpw $security || exit 1