Plain mode without mirroring user account
- Dominant language
- Go
- Stars
- 21.9k
- Forks
- 957
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 53
Description
### Description
Currently we still create the user, even when running in plain mode.
We don't _have_ to do this, we can add the ssh key to the default user?
More similar to the old "vagrant" user
But either "ubuntu"* or maybe "lima"
### default
The key would move from current "users.ssh-authorized-keys" (sic) to the root.
```yaml
#cloud-config
ssh_authorized_keys:
```
### lima
Since we are not mirroring users, we don't need to add `~/.ssh` but only `_config`
The "lima" user would still be created (like before), but not mirror host information.
```yaml
users:
- name: "lima"
uid: "1000"
gecos: "Lima"
homedir: "/home/lima.linux"
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
lock_passwd: true
ssh-authorized-keys:
```
----
\* that is: whatever is in cloud.cfg in the image that is currently being used
/etc/cloud/cloud.cfg
```yaml
# A set of users which may be applied and/or used by various modules
# when a 'default' entry is found it will reference the 'default_user'
# from the distro configuration specified below
users:
- default
```
```yaml
# System and/or distro specific settings
# (not accessible to handlers/transforms)
system_info:
# This will affect which distro class gets used
distro: ubuntu
# Default user name + that default users groups (if added/used)
default_user:
name: ubuntu
lock_passwd: True
gecos: Ubuntu
groups: [adm, cdrom, dip, lxd, sudo]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
```
https://cloudinit.readthedocs.io/en/latest/explanation/configuration.html
The user name probably needs reporting back, similar to SSH Local Port
It is needed to connect, just like the ssh host keys for strict host key checking:
* https://github.com/lima-vm/lima/issues/3775
Contributor guide
Assessment
This issue has not been assessed yet.