Commit Graph
3 Commits
Author SHA1 Message Date
Claude 329cf02304 Callers change their passwords: mode = passwd
A built-in item: the current password (checked against the backends
again, which finds the one that holds the account), then the new one
twice (min_password, not the current one, three tries).  The password
changes where the account is:

- file: the user's line rewritten in place under the lock signups take,
  a note after the hash kept; bcrypt, or text with hash = plain
- sql: update_query with update_args (user, password, old_password) and
  update_hash (bcrypt, or none for a query that hashes it)
- ldap: Password Modify (RFC 3062) bound as the user, the server's own
  policy and hashing applying
- system: PAM's password stack; its messages (a quality module's
  reasons) go to the caller

A refused password leaves the old one; the selections after a change
get the new one.  The PAM sample has the password stack, and says that
pam_unix applies no quality checks for root (pam_pwquality with
enforce_for_root does).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 02:30:28 +00:00
Claude f912b979ac System accounts by PAM only; message of the day; menu choices as words
auth = system is now PAM alone (pam_service): the /etc/shadow reader and
its yescrypt and crypt dependencies are gone.  The uid, root and group
rules stay, by the name service.

motd and motd_file (read at each login) show after the welcome, before
the menu.

The menu reads a line: an item's key (now one or more characters), its
name or an alias selects it, in any case (p, ppp, dialup); ? shows the
menu again, an unknown choice says so.  [menu] hangup takes several
words (G goodbye bye logoff); hotkeys = yes keeps one-key selection for
one-character keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 03:20:57 +00:00
Claude 9a407f269e Authentication by the system's accounts: /etc/shadow or PAM
auth = system checks the caller against the machine's own accounts.
method = shadow reads /etc/passwd and /etc/shadow and verifies their
crypt hashes in Go (yescrypt, SHA-512, SHA-256, MD5, bcrypt), refusing
locked accounts and expired accounts or passwords.  method = pam runs a
PAM service's auth and account stacks (sssd, Kerberos, anything PAM
does); it needs a build with -tags pam, which make picks when libpam's
headers are installed, so a plain go build stays free of C.  Accounts
below min_uid and root (unless allow_root) are not let in, and groups
limits logins to members.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 00:47:19 +00:00