set random password
This commit is contained in:
parent
fd3195a8b2
commit
a1a52d3f89
@ -3,7 +3,8 @@
|
||||
WEBROOT=/www
|
||||
PHP=${PHP:-none}
|
||||
USERNAME=${USERNAME:-theuser}
|
||||
adduser -DH -h "${WEBROOT}" -G "nginx" -u "1000" "${USERNAME}"
|
||||
RANDOMPWD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13)
|
||||
printf '%s\n%s' "${RANDOMPWD}" "${RANDOMPWD}" | adduser -DH -h "${WEBROOT}" -G "nginx" -u "1000" "${USERNAME}"
|
||||
|
||||
chown "${USERNAME}:nginx" "${WEBROOT}" -R
|
||||
find "${WEBROOT}" -type d -exec chmod 0755 {} \;
|
||||
|
Loading…
Reference in New Issue
Block a user