Mercurial > hgrepos > hgweb.cgi > s4
changeset 563:7ab2ceb1b8dd
$DISABLED controls password disabling
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 14 Apr 2019 21:15:45 +0900 |
parents | 3b5561ea2117 |
children | b86a82ffe407 |
files | scripts/add-user-csv.sh |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/add-user-csv.sh Sun Apr 14 15:33:21 2019 +0900 +++ b/scripts/add-user-csv.sh Sun Apr 14 21:15:45 2019 +0900 @@ -5,11 +5,13 @@ Usage: ./add-user-csv.sh CSVfile >&2 Csv file should be the form of: username(email),notify-email,gecos,IniPassword + Set $DISABLED for setting disabled password EOF exit 1 fi target=$(cd `dirname "$1"`; pwd)/`basename $1` +encp=${DISABLED:+DisabledPassword} cd `dirname $0`/.. if ! . ./s4-funcs.sh; then @@ -28,7 +30,7 @@ EOF while IFS=, read user email gecos inipswd do - encpswd=`mycrypt "$inipswd" 'StOpmE'` + encpswd=${encp:-`mycrypt "$inipswd" 'StOpmE'`} case "$user" in *\'*) echo "Skipping [$user]" continue ;;