summaryrefslogtreecommitdiffstats
path: root/cmd/admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/admin.go')
-rw-r--r--cmd/admin.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/admin.go b/cmd/admin.go
index d8acce7788..9422e50709 100644
--- a/cmd/admin.go
+++ b/cmd/admin.go
@@ -322,6 +322,12 @@ func runCreateUser(c *cli.Context) error {
// always default to true
var changePassword = true
+ // If this is the first user being created.
+ // Take it as the admin and don't force a password update.
+ if n := models.CountUsers(); n == 0 {
+ changePassword = false
+ }
+
if c.IsSet("must-change-password") {
changePassword = c.Bool("must-change-password")
}