feat: netOrk's own account through the current login (NetOrk/netork#1817)
driver / lint (pull_request) Failing after 7s
driver / standard (pull_request) Successful in 21s
driver / types (pull_request) Successful in 1m10s
driver / test (3.12) (pull_request) Successful in 1m9s
driver / test (3.13) (pull_request) Successful in 1m6s
driver / lowest (pull_request) Successful in 50s
driver / build (pull_request) Successful in 38s
driver / security (pull_request) Successful in 1m19s
CI / driver (pull_request) Failing after 2m35s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Failing after 7s
driver / standard (pull_request) Successful in 21s
driver / types (pull_request) Successful in 1m10s
driver / test (3.12) (pull_request) Successful in 1m9s
driver / test (3.13) (pull_request) Successful in 1m6s
driver / lowest (pull_request) Successful in 50s
driver / build (pull_request) Successful in 38s
driver / security (pull_request) Successful in 1m19s
CI / driver (pull_request) Failing after 2m35s
driver / publish (pull_request) Skipped
add_service_account(name, public_key) creates or reopens the account through the login the driver uses today: a key and no password, and a rule of its own in 85-service-<name> that lets it run everything as root without a password, checked with visudo and sudo -l. Root is refused; run again with the account the driver already logs in with, it only adds what is missing.
This commit is contained in:
1 parent
25cc264306
commit
666be091e3
3 files changed
+315
-14
No files matched your search
@@ -14,6 +14,12 @@ recorded here; their history is the git log.
|
||||
3.12 venv no longer has.
|
||||
|
||||
### Added
|
||||
- `LocalAccountsMixin.add_service_account(name, public_key)`: netOrk's own account,
|
||||
created through the account the driver logs in with today. It takes a key and no
|
||||
password, and a rule of its own in `85-service-<name>` lets it run everything as
|
||||
root without a password (`NOPASSWD: ALL`, checked with `visudo` and `sudo -l`). An
|
||||
account that is there is opened again and keeps its other keys; root is refused
|
||||
(NetOrk/netork#1817).
|
||||
- `LocalAccountsMixin` (`napalm_device_types.local_accounts`): personal login accounts
|
||||
on a host. `get_local_accounts(names)` reads them back (groups, lock, sudo, key
|
||||
files), `add_local_account(name, public_key, password_hash=, admin=)` creates or
|
||||
|
||||
Reference in new issue
Block a user