Hi,
On Fri, Nov 03, 2023 at 08:33:29PM +0000, Ian via BitFolk Users wrote:
Is this something that cloud-init can be told not to
do?
I think so, and also it can execute arbitrary code at various steps,
but…
Certainly when I last started a Ubuntu VPS with 'a
big US-based VPS
vendor', it only came up with root rather than ubuntu as well.
If you could change it not to have a default user, it would be good...
For basically its entire existence Ubuntu has forced the creation
and use of an additional non-privileged user account and discouraged
direct use of the root account. If Akamai or whoever is providing a
default image of Ubuntu that only has a root user, that would be
a surprising and strange departure from normal behaviour for most
Ubuntu users. In general I want to keep things as close to a default
install as possible. We would get more confusion and requests to put
it back to default than there are to not have the non-root user.
So then one might ask if we could give people the option of changing
what the initial user name is, and we certainly could, but I would
have to ask what the point is. If we have to ask whether you want
the default initial user name, then if not what user name you DO
want, and then if password auth is to be allowed what the password
should be, well… it's not a lot more key strokes to just type the
three commands needed to create a new user and disable the "ubuntu"
one.
$ sudo adduser jbloggs
$ sudo usermod -a -G sudo jbloggs
$ sudo usermod -L ubuntu
(THe approach of renaming the user and home directory may be better
if one wanted to retain the SSH authorized_keys etc.)
Rather than add complexity for everyone in order to satisfy
particular minority requests, I think it is better to just provide
something that works closely to upstream defaults. Users can then
customise it starting from a known baseline, preferably with their
own choice of config management.
I think I would be more receptive to users wanting to provide their
own cloud-init or Debian preseed data if those were popular
requests. However the trend has been to move away from more
OS-specific bootstrapping methods in favour of getting a basic image
up and running and then having config management of choice configure
it. cloud-init sits somewhere in the middle, as it is a lot more
cross-platform.
Thanks,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting