Skip to content

Commit 5243e00

Browse files
committed
19520: FIX Fix missing Welcome snapin on fresh installations
CMK-33273 Change-Id: Ia773ee2c435092c8bd88cea89c1000053b8d8d69
1 parent 9c3319f commit 5243e00

2 files changed

Lines changed: 30 additions & 14 deletions

File tree

.werks/19520.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[//]: # (werk v3)
2+
# Fix missing Welcome snapin on fresh installations
3+
4+
key | value
5+
---------- | ---
6+
date | 2026-04-07T11:26:42.586582+00:00
7+
version | 2.6.0b1
8+
class | fix
9+
edition | community
10+
component | wato
11+
level | 1
12+
compatible | yes
13+
14+
Previously, the "Welcome to Checkmk" snapin was not shown in the sidebar on freshly installed sites. The initial admin user created during site installation was missing the `created_on_version` attribute, so Checkmk treated it as a pre-2.5 user and excluded the welcome snapin from the default sidebar.

cmk/gui/watolib/sample_config/_impl.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from cmk.gui.groups import GroupSpec
1818
from cmk.gui.log import logger
1919
from cmk.gui.userdb import (
20+
add_internal_attributes,
2021
create_cmk_automation_user,
2122
get_user_attributes,
2223
load_users,
@@ -315,23 +316,24 @@ def generate(self) -> None:
315316
if pw_hash is None:
316317
raise ValueError("No password found for user 'cmkadmin'")
317318

319+
admin_user = UserSpec(
320+
{
321+
"alias": "cmkadmin",
322+
"connector": "htpasswd",
323+
# The password was set through 'omd create'. Get it so that it is not
324+
# removed by Htpasswd.save_users().
325+
"password": pw_hash,
326+
"locked": False,
327+
"roles": ["admin"],
328+
"language": "en",
329+
}
330+
)
331+
add_internal_attributes(admin_user)
332+
318333
save_users(
319334
{
320335
**load_users(lock=True),
321-
UserId("cmkadmin"): UserSpec(
322-
{
323-
"alias": "cmkadmin",
324-
"connector": "htpasswd",
325-
# The password was set through 'omd create'. Get it so that it is not
326-
# removed by Htpasswd.save_users().
327-
"password": pw_hash,
328-
"locked": False,
329-
"roles": ["admin"],
330-
"language": "en",
331-
"start_url": "welcome.py",
332-
"user_scheme_serial": 1,
333-
}
334-
),
336+
UserId("cmkadmin"): admin_user,
335337
},
336338
get_user_attributes([]),
337339
user_connections=[],

0 commit comments

Comments
 (0)