22-gen-htpasswd 235 B

123456
  1. [ -f /etc/lighttpd/htpasswd ] || (
  2. _PWD='changeme'
  3. _HASH=$(printf '%s' "admin:superglue:$_PWD" | md5sum | cut -d' ' -f1)
  4. echo "admin:superglue:$_HASH" > /etc/lighttpd/htpasswd
  5. echo -e "$_PWD\n$_PWD" | passwd root &>/dev/null
  6. )