Line | |
---|
1 | if [ $whoami = "root" ]; then
|
---|
2 | exit 0;
|
---|
3 | fi
|
---|
4 |
|
---|
5 | . basicsmb.fns
|
---|
6 |
|
---|
7 | test_listfilesrootnpw() {
|
---|
8 | remote_name="$1"
|
---|
9 | echo $prefix/bin/smbclient //$remote_name/samba -n buildclient -Uroot% -c 'ls'
|
---|
10 | $prefix/bin/smbclient //$remote_name/samba -n buildclient -Uroot% -c 'ls'
|
---|
11 | status=$?
|
---|
12 | if [ $status = 0 ]; then
|
---|
13 | echo "smbd listed files AS ROOT with NO PASSWORD (hosts equiv test)!"
|
---|
14 | return 1
|
---|
15 | else
|
---|
16 | echo "listing files with smbd failed with status $status (correct)"
|
---|
17 | fi
|
---|
18 | return 0
|
---|
19 | }
|
---|
20 |
|
---|
21 | password="not-a-valid-password"
|
---|
22 | security="hostsequiv"
|
---|
23 | (test_smb_conf_setup ) || exit 1
|
---|
24 |
|
---|
25 | (test_listfilesauth $security) || exit 1
|
---|
26 | (test_listfilesrootnpw $security) || exit 1
|
---|
Note:
See
TracBrowser
for help on using the repository browser.