/srv/irclogs.ubuntu.com/2020/07/18/#cloud-init.txt

uebera||Are there known problems regarding a specified uid of a new account? "users:    - name: sys-maint    uid: 500    no_user_group: true    primary_group: adm" results in the creation of uid/gid 1000 (using cloud-init 20.1-10-g71af48df-0ubuntu5). What am I missing?20:05
meenauebera||: maybe the system doesn't allow to create a user with a uid < 1000, unless you say it's a system user.20:11
uebera||meena: Good point, will try to set system to true.20:14
uebera||I wonder, though, why I would not see any error/warning message in that case.20:14
uebera||Also, according to the documentation, there would not be any home directory in that case (which would make it difficult to populate /home/sys-maint/.ssh/authorized_keys, I guess).20:16
meenauebera||: for the first question: try to doing it locally on the command line. for the second:20:18
meenawhy does it have to be uid 500?20:18
uebera||meena: Because that's the uid for said account on xx machines.20:30
uebera||(Might have been better to choose 400 in the past, but oh well.)20:32
uebera||meena: For the record, using "system: true" resulted in a home directory owned by root:root, the uid in use is now 998, but .../.ssh/authorized_keys have been populated. Somehow leaves me with more questions regarding uid handling.20:58
meenauebera||:  🙈️🙉️  i have to sleep now.20:59
uebera||meena: Me too. ;)20:59
uebera||My bouncer doesn't need sleep, though, so if anyone can provide me with some pointers, I'm happy to go through them tomorrow… :D21:00
uebera||Ok, I identified the underlying issue myself: https://bugs.launchpad.net/cloud-init/+bug/1396362/comments/4 tells you that the value for uid has to be provided as a string rather than an integer.21:17
ubot5Ubuntu bug 1396362 in cloud-init "Support UID and GID specification in user and group definitions" [Low,Triaged]21:17
uebera||% id -a21:17
uebera||uid=500(sys-maint) gid=4(adm) groups=4(adm),27(sudo)21:17
uebera||\o/ ... gn821:17

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!