blob: 42e1b5e7df5a88ce5a6330ab117c55d1fd6576b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh
#
set -e
set -u
ACCOUNT_NAME="${SAMBA_CPS_ACCOUNT_NAME}"
INVALIDPW="$1"
NEWPW=`cat -`
echo -n "${NEWPW}" | grep -q "^${INVALIDPW}\$" && {
echo "Found invalid password" >&1
exit 1
}
echo -n "${NEWPW}" | grep -q "^${ACCOUNT_NAME}\$" && {
echo "Password includes ACCOUNT_NAME" >&1
exit 1
}
exit 0
|