From c01513285c56366dd9568ca0ecba31cb5799d19b Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Jan 09 2020 15:01:57 +0000 Subject: [PATCH 1/2] Using 'centos' cloud user on centos images Signed-off-by: Fabian Arrotin --- diff --git a/CentOS-8-EC2.ks b/CentOS-8-EC2.ks index 796c74b..2415d71 100644 --- a/CentOS-8-EC2.ks +++ b/CentOS-8-EC2.ks @@ -101,7 +101,9 @@ EOL # 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 diff --git a/CentOS-8-GenericCloud.ks b/CentOS-8-GenericCloud.ks index 13df30b..f6f8845 100644 --- a/CentOS-8-GenericCloud.ks +++ b/CentOS-8-GenericCloud.ks @@ -101,7 +101,9 @@ EOL # 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 From a811edccb5e7a72209c7642a455fc3413868b737 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Jan 09 2020 15:28:37 +0000 Subject: [PATCH 2/2] Fixed the Stream cloud images too for centos cloud user Signed-off-by: Fabian Arrotin --- diff --git a/CentOS-8-Stream-EC2.ks b/CentOS-8-Stream-EC2.ks index 00b06b0..7f6c1ce 100644 --- a/CentOS-8-Stream-EC2.ks +++ b/CentOS-8-Stream-EC2.ks @@ -101,7 +101,9 @@ EOL # 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 diff --git a/CentOS-8-Stream-GenericCloud.ks b/CentOS-8-Stream-GenericCloud.ks index 1b5952a..96345f7 100644 --- a/CentOS-8-Stream-GenericCloud.ks +++ b/CentOS-8-Stream-GenericCloud.ks @@ -101,7 +101,9 @@ EOL # 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