3 # Copyright (c) 2022 Pavel Filipenský <pfilipen@redhat.com>
5 # Tests for "username map" smb.conf parameter for UNIX groups
9 Usage: test_usernamemap.sh SERVER SMBCLIENT
16 SMBCLIENT
="${VALGRIND} ${SMBCLIENT}"
18 incdir
=$
(dirname "$0")/..
/..
/..
/testprogs
/blackbox
19 .
"${incdir}"/subunit.sh
23 # jackthemapper is mapped to jacknomapper, so we need jacknomapper password
24 testit
"jackthemapper" "${SMBCLIENT}" //"${SERVER}"/tmp -U"${SERVER}/jackthemapper%nOmApsEcrEt" -c ls || failed
=$
((failed
+ 1))
25 # jacknomapper is not mapped, so we need jacknomapper password
26 testit
"jacknomapper" "${SMBCLIENT}" //"${SERVER}"/tmp -U"${SERVER}/jacknomapper%nOmApsEcrEt" -c ls || failed
=$
((failed
+ 1))
28 testok
"$0" "${failed}"