From 317f4d240604758fa477ee552ae08a04c9cc0953 Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Mon, 24 Aug 2026 01:12:48 +0800 Subject: [PATCH] docs: clarify the default admin credentials only seed the database The default_admin_username/password descriptions now state that the values are applied when the controller database is created and only take effect again after it is re-created (resetting the account). --- gns3server/config_samples/gns3_server.conf | 10 ++++++---- gns3server/schemas/config.py | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gns3server/config_samples/gns3_server.conf b/gns3server/config_samples/gns3_server.conf index 86c6007e2..c3eb76bc9 100644 --- a/gns3server/config_samples/gns3_server.conf +++ b/gns3server/config_samples/gns3_server.conf @@ -6,12 +6,14 @@ jwt_algorithm = HS256 jwt_access_token_expire_minutes = 1440 jwt_refresh_token_expire_minutes = 43200 -; Initial default super admin username -; It cannot be changed once the controller has started once +; Username of the super admin account seeded when the controller database is +; created. Changing it has no effect until the database is re-created (which +; resets the account back to these values). default_admin_username = admin -; Initial default super admin password -; It cannot be changed once the controller has started once +; Password of the super admin account seeded when the controller database is +; created. Changing it has no effect until the database is re-created (which +; resets the account back to these values). default_admin_password = admin [Server] diff --git a/gns3server/schemas/config.py b/gns3server/schemas/config.py index 6d1977ed7..227129b28 100644 --- a/gns3server/schemas/config.py +++ b/gns3server/schemas/config.py @@ -43,10 +43,12 @@ class ControllerSettings(BaseModel): 43200, description="Lifetime of the JWT refresh tokens in minutes (30 days by default)") default_admin_username: str = Field( "admin", - description="Initial default super admin username, cannot be changed once the controller has started once") + description="Username of the super admin account seeded when the controller database is created; " + "changing it has no effect until the database is re-created (which resets the account)") default_admin_password: SecretStr = Field( SecretStr("admin"), - description="Initial default super admin password, cannot be changed once the controller has started once") + description="Password of the super admin account seeded when the controller database is created; " + "changing it has no effect until the database is re-created (which resets the account)") model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True)