System user cannot be created with a homedir
Bug #1917135 reported by
Jakub Kuczys
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Undecided
|
Unassigned |
Bug Description
While it is not typical, system users can be created with a home directory by passing `-m/--create-home` flag to the command along with `-r/--system` flag. This cannot be done currently as `system: true` option will forcefully add the `-M` flag to the command. I think that there should be some way to do this other than manually calling `useradd`. I was expecting that if I put `homedir: /home/homeassis
```
#cloud-config
users:
- default
- name: homeassistant
gecos: Home Assistant
system: true
lock_passwd: true
homedir: /home/homeassistant
```
To post a comment you must log in.
Thanks for filing this issue and improving cloud=init. This is a confirmed gap in behavior and that override feels appropriate in my mind. Will run the idea past others to see if this is something we agree is fixable. It feels like defining a homedir with a system user indicates explicitly that you know what your intentions are.