feat(accounts): clear a password, replace and remove keys on FreeBSD
driver / lint (pull_request) Successful in 26s
driver / standard (pull_request) Successful in 29s
driver / types (pull_request) Successful in 1m9s
driver / test (3.13) (pull_request) Successful in 1m3s
driver / test (3.12) (pull_request) Successful in 1m11s
driver / lowest (pull_request) Successful in 36s
driver / build (pull_request) Successful in 43s
driver / security (pull_request) Successful in 1m27s
CI / driver (pull_request) Successful in 2m59s
driver / publish (pull_request) Skipped

napalm-device-types 4.28.0 lets add_local_account remove the old keys
(replaces) and the password (clear_password), and adds
remove_local_account_keys. The key changes run through the mixin's own
key files as the person; the password goes with chpass -p '*', the
field pw useradd -w no writes, which sshd does not take for a lock.

See NetOrk/netork#2013
This commit is contained in:
Christian Manivong committed 2026-11-04 11:47:26 +01:00
1 parent 198f50f6be
commit a16918245c
4 files changed
+105 -1

No files matched your search

+11
View File
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Personal accounts on FreeBSD follow what the person changes (NetOrk/netork#2013):
`add_local_account(..., replaces=[...])` takes the old keys out of the account's key
files as the new one goes in, `remove_local_account_keys` takes deleted keys out and
leaves the account open, and `add_local_account(..., clear_password=True)` removes the
password (`chpass -p '*'`): the account logs in with its key only and has no sudo.
Keys the person added on the host stay.
### Changed
- Needs napalm-device-types 4.28.0.
### Added
- Scheduled jobs on FreeBSD and OpenBSD (NetOrk/netork#1933, #27), through
napalm-device-types' `PosixScheduledJobsMixin`: `get_scheduled_jobs()` reads