ソースを参照

Change default password for user abc to random value

Toastie 1 年間 前
コミット
34b6f4490b
1 ファイル変更3 行追加0 行削除
  1. 3 0
      data/etc/s6-overlay/s6-rc.d/init-custom-users/run

+ 3 - 0
data/etc/s6-overlay/s6-rc.d/init-custom-users/run

@@ -2,6 +2,9 @@
 
 test -f /etc/users.list || exit 0
 
+echo "Change default password for user abc to random value"
+echo abc:`openssl rand -base64 30` | tee >(sudo chpasswd)
+
 while read id username hash groups; do
         # Skip, if user already exists
         grep ^$username /etc/passwd && continue