#11 Using 'centos' cloud user on centos images
Merged 4 years ago by bstinson. Opened 4 years ago by arrfab.
centos/ arrfab/kickstarts master  into  master

file modified
+3 -1
@@ -101,7 +101,9 @@ 

  # make sure firstboot doesn't start

  echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot

  

- echo -e 'cloud-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

+ # centos cloud user

+ echo -e 'centos\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

+ sed -i 's/name: cloud-user/name: centos/g' /etc/cloud/cloud.cfg

  

  dnf clean all

  

file modified
+3 -1
@@ -101,7 +101,9 @@ 

  # make sure firstboot doesn't start

  echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot

  

- echo -e 'cloud-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

+ # centos cloud user

+ echo -e 'centos\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

+ sed -i 's/name: cloud-user/name: centos/g' /etc/cloud/cloud.cfg

  

  dnf clean all

  

file modified
+3 -1
@@ -101,7 +101,9 @@ 

  # make sure firstboot doesn't start

  echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot

  

- echo -e 'cloud-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

+ # centos cloud user

+ echo -e 'centos\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

+ sed -i 's/name: cloud-user/name: centos/g' /etc/cloud/cloud.cfgecho -e 'cloud-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

  

  dnf clean all

  

@@ -101,7 +101,9 @@ 

  # make sure firstboot doesn't start

  echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot

  

- echo -e 'cloud-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

+ # centos cloud user

+ echo -e 'centos\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

+ sed -i 's/name: cloud-user/name: centos/g' /etc/cloud/cloud.cfgecho -e 'cloud-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

  

  dnf clean all

  

We always used "centos" as cloud user for our cloud images (including but not limited to AWS/EC2)
This PR fixes it through the kickstart, so at image build time, rather through patching cloud-init package itself.

Signed-off-by: Fabian Arrotin arrfab@centos.org

1 new commit added

  • Fixed the Stream cloud images too for centos cloud user
4 years ago

Pull-Request has been merged by bstinson

4 years ago