cloud-init-dev team mailing list archive
Mailing list archive
Re: Help request: ec2-user vs root user for cloud-init
On Tue, 24 Apr 2012, jvlcek wrote:
> Hello Cloud-init-dev folks,
> I have a cloud-init question.
> A little backgroud:
> I'm working on a prototype of using cloud-init on the
> non-ec2 cloud back end, RHEVm.
> I use Delta Cloud to launch and inject the user data.
> Deltacloud | Many Clouds. One API. No Problem.
> Cloud Init seems to rely on an ec2-user being created, which
> does not exist by default on RHEVm.
Yes, Cloud-init does rely on this. You could create the user via user-data
via a boothook (which runs pretty much immediately on boot, and before any
code that would require the user to be created).
https://help.ubuntu.com/community/CloudInit for how to do that.
Untested, but something like this might work as user-data (or a part
grep -q "ec2-user" /etc/passwd && exit 0 # already added
adduser --home /home/ec2-user --shell /bin/bash ec2-user
> My Question:
> Is there a way to have Cloud Init use the root user instead
> of the ec2-user and if so how? Is this documented somewhere?
No, there is not, but patches for this are definitely welcome, and you're
not the first person to request it.