如何解决NextCloud升级的密码提示?
- By : Will
- Category : Cloud storage
Cloud storage
1 前言
一个问题,一篇文章,一出故事。
笔者最近升级NextCloud发现如下提示,
2 最佳实践
2.1 创建更新密码
你需要参阅如下命令创建更新密码,
php -r '$password = trim(shell_exec("openssl rand -base64 48"));if(strlen($password) === 64) {$hash = password_hash($password, PASSWORD_DEFAULT) . "\n"; echo "Insert as \"updater.secret\": ".$hash; echo "The plaintext value is: ".$password."\n";}else{echo "Could not execute OpenSSL.\n";};'
命令会自动创建如下密钥对,
Insert as "updater.secret": $2y$10$ViZ6KCLQ91RfJFmKVp4h0evhnlzsAM8N4WjbE94SD8rYqmlOJCeEy The plaintext value is: d0mCFssAmjNBvh1tQnjyFrCVUthwHxw6MWvM1SzWf104zEjnOvPbjJRBXaGGqf50
2.2 设置更新秘密
vim /var/www/nextcloud/config/config.php
并加入如下配置,
'updater.secret' => '$2y$10$ViZ6KCLQ91RfJFmKVp4h0evhnlzsAM8N4WjbE94SD8rYqmlOJCeEy',
没有评论