Skip to content

Enhance password validation warnings when disabling autologin#37

Open
assisted-by-ai wants to merge 1 commit intoKicksecure:masterfrom
assisted-by-ai:claude/fix-autologin-sysmaint-bug-rOTs3
Open

Enhance password validation warnings when disabling autologin#37
assisted-by-ai wants to merge 1 commit intoKicksecure:masterfrom
assisted-by-ai:claude/fix-autologin-sysmaint-bug-rOTs3

Conversation

@assisted-by-ai
Copy link
Copy Markdown

Summary

Renamed and enhanced the password validation warning function to provide more comprehensive feedback when disabling autologin for user accounts. The function now checks for locked or disabled passwords in addition to empty passwords, and provides more accurate messaging based on the actual password state.

Key Changes

  • Renamed warn_on_empty_user_password() to warn_on_unusable_password() to better reflect its expanded functionality
  • Enhanced the function to detect and warn about locked or disabled passwords using is_pass_locked() and is_pass_disabled() checks
  • Updated warning messages to be more specific:
    • For locked/disabled passwords: warns that manual login will NOT be possible and suggests using 'pwchange' to set a password
    • For empty passwords: clarifies that "anyone" can log in (changed from "users") and suggests setting a password
  • Added calls to warn_on_unusable_password() in cli_disable_autologin() function for both regular users and sysmaint account
  • Updated all function call sites to use the new function name

Implementation Details

  • The function now uses a conditional structure to check password states in order of severity (locked/disabled first, then empty)
  • All warning messages include a reference to the Kicksecure wiki for additional information
  • The warning is now consistently applied whenever autologin is disabled, providing users with important security information about the account's password state

https://claude.ai/code/session_01NAtpA8bBuvZfeu1PeytGRs

When disabling autologin for sysmaint (or any user), the script now
checks if the account password is locked or disabled, and warns that
manual login will not work. Previously, only empty passwords were
checked with a misleading message, and the CLI mode had no warning
at all, leaving users unable to log in after disabling autologin.

https://claude.ai/code/session_01NAtpA8bBuvZfeu1PeytGRs
@ArrayBolt3
Copy link
Copy Markdown
Contributor

Integrated in ArrayBolt3@ae4eb79, however I chose a different wiki page for the documentation when faced with an unusable password, because the suggested "login" page doesn't have good info about locked passwords.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants