fix: no fixed uid for netOrk's own account on OMV yet (NetOrk/netork#1817) #14

Merged
christianmanivong merged 1 commits from feature/system-user-uid-1817 into main 2026-11-01 12:44:21 +00:00
3 changed files with 16 additions and 0 deletions

No files matched your search

+3
View File
@@ -7,6 +7,9 @@ All notable changes to this driver. The format follows
## [Unreleased]
### Added
- netOrk's own account with a fixed uid is not made on OMV yet (NetOrk/netork#1817):
`_account_create_with_uid` raises `NotImplementedError`, as the keys go through
`UserMgmt`, which knows only the users it made.
- Personal accounts the way OMV's web UI makes them (NetOrk/netork#1793), on top of
napalm-linux's `get_local_accounts()`, `add_local_account()` and `lock_local_account()`.
OMV's sshd lets in only `root` and `_ssh`, and OMV keeps a user's keys in its own
+5
View File
@@ -105,6 +105,11 @@ class OmvLocalAccountsMixin(LocalAccountsMixin):
)
return [["usermod", "-p", password_hash, name]] if password_hash else []
def _account_create_with_uid(self, name: str, uid: int) -> list[list[str]]:
"""Not on OMV yet (NetOrk/netork#1817): its keys go through ``UserMgmt``, which
knows only the users it made, and whether ``setUser`` takes a uid is untested."""
raise NotImplementedError
def _account_open(
self, name: str, password_hash: str | None, *, locked: bool
) -> list[list[str]]:
+8
View File
@@ -245,3 +245,11 @@ def test_an_account_omv_holds_no_key_for_is_not_written() -> None:
)
def test_the_key_omv_stores_is_read_back_as_its_base64(text: str, blob: str | None) -> None:
assert rfc4716_blob(text) == blob
def test_netorks_own_account_with_a_fixed_uid_is_not_made_on_omv_yet() -> None:
"""Its keys go through UserMgmt, which knows only the users it made (NetOrk/netork#1817)."""
import pytest
with pytest.raises(NotImplementedError):
_Driver(Omv())._account_create_with_uid("netork", 900)