feat: enhance user account management during VM creation with automatic user creation and metadata preservation
This commit is contained in:
@@ -234,7 +234,7 @@ private port rules. The default password produces a warning on stderr. Use
|
||||
### Names and Credentials
|
||||
|
||||
```sh
|
||||
sudo ./uvm.py create --name web --username root --password '<guest-password>'
|
||||
sudo ./uvm.py create --name web --username codemate-user --password '<guest-password>'
|
||||
```
|
||||
|
||||
Names are optional, unique within the registry, and case-sensitive. They must
|
||||
@@ -243,8 +243,11 @@ that impersonate generated IDs (`vm-` plus 32 hexadecimal characters) are
|
||||
rejected. Names and IPs stay reserved while a VM is stopped. Names do not
|
||||
create DNS records, and identifiers are not matched by ID prefix.
|
||||
|
||||
`--username` must name an account already present in the guest image. A
|
||||
`--password` value is visible in process arguments and may enter shell
|
||||
`--username` selects the guest login account. If a custom username is missing,
|
||||
UVM creates it on the private disk with a primary group, `/home/USERNAME`, and
|
||||
the `/bin/sh` login shell. Existing accounts keep their identity and home.
|
||||
|
||||
A `--password` value is visible in process arguments and may enter shell
|
||||
history. Prefer `--password-stdin`, which reads one line, strips the trailing
|
||||
line ending, and rejects empty passwords, control characters, or passwords
|
||||
longer than 128 characters. It cannot be combined with `--password`.
|
||||
@@ -405,11 +408,13 @@ guest, or prove SSH/egress connectivity. Use inspect for per-VM policy health.
|
||||
|
||||
## 7. Connect with SSH
|
||||
|
||||
UVM provisions a password for an existing account. The default credentials are
|
||||
`root` / `root`. Your guest image must include:
|
||||
UVM provisions a password for the requested account, creating missing custom
|
||||
users during VM creation. The default credentials are `root` / `root`. Your
|
||||
guest image must include:
|
||||
|
||||
- An SSH server.
|
||||
- The requested login user plus standard passwd and shadow files.
|
||||
- Standard passwd and shadow files, plus `/etc/ssh/sshd_config`.
|
||||
- `/etc/group` and `/bin/sh` for new users; the default `root` account must exist.
|
||||
|
||||
UVM replaces conventional RSA, ECDSA, and Ed25519 SSH host keys in the private
|
||||
disk during creation and removes Firecracker's publicly known demo login key.
|
||||
|
||||
Reference in New Issue
Block a user