util-yaml - revisit the configuration written for the calamares users module #348

Open
opened 2025-12-08 16:07:25 +00:00 by fhdk · 1 comment
fhdk commented 2025-12-08 16:07:25 +00:00 (Migrated from gitlab2.manjaro.org)

From a forum topic regarding invalid passwords written when user select auto login and the related investigation into the issue lead back to the configuration written by util-yaml.sh by write_users_conf() function.

The installer’s configuration /etc/calamares/modules/users.conf with content

---
defaultGroups:
    - lp
    - network
    - power
    - sys
    - wheel
autologinGroup:  autologin
doAutologin:     false
displayAutologin:   true
sudoersGroup:    wheel
passwordRequirements:
    nonempty: true
setRootPassword: true
doReusePassword: false
availableShells: /bin/bash, /bin/zsh
avatarFilePath:  ~/.face
userShell:       /usr/bin/zsh
user:
  shell: /usr/bin/zsh
  forbidden_names: [ root ]
  home_permissions: "o700"

The schema defines passwordRequirements as part of users.schema.yaml but the schema does not define a nonempty property.

    passwordRequirements:
        additionalProperties: false
        type: object
        properties:
            minLength: { type: number }
            maxLength: { type: number }
            libpwquality: { type: array, items: { type: string } }  # Don't know what libpwquality supports

src/modules/users/users.schema.yaml · development · Applications / calamares · GitLab

We will need a revision to match the latest schema for the users module - at the same time - we need to verify if other functions are writing invalid calamares configuration files.

@philm

From a [forum topic regarding invalid passwords written when user select auto login](https://forum.manjaro.org/t/problems-installing-manjaro/183474/3) and the related investigation into the issue lead back to the configuration written by `util-yaml.sh` by `write_users_conf()` function. The installer’s configuration `/etc/calamares/modules/users.conf` with content ``` --- defaultGroups: - lp - network - power - sys - wheel autologinGroup: autologin doAutologin: false displayAutologin: true sudoersGroup: wheel passwordRequirements: nonempty: true setRootPassword: true doReusePassword: false availableShells: /bin/bash, /bin/zsh avatarFilePath: ~/.face userShell: /usr/bin/zsh user: shell: /usr/bin/zsh forbidden_names: [ root ] home_permissions: "o700" ``` The schema defines `passwordRequirements` as part of `users.schema.yaml` but the schema does not define a `nonempty` property. ``` passwordRequirements: additionalProperties: false type: object properties: minLength: { type: number } maxLength: { type: number } libpwquality: { type: array, items: { type: string } } # Don't know what libpwquality supports ``` – [src/modules/users/users.schema.yaml · development · Applications / calamares · GitLab](https://gitlab.manjaro.org/applications/calamares/-/blob/development/src/modules/users/users.schema.yaml?ref_type=heads#L43-49) We will need a revision to match the latest schema for the users module - at the same time - we need to verify if other functions are writing invalid calamares configuration files. @philm
fhdk commented 2025-12-08 16:10:34 +00:00 (Migrated from gitlab2.manjaro.org)

changed the description

changed the description
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tools/manjaro-tools#348
No description provided.