Skip to content

Commit

Permalink
Merge pull request #491 from KeerthanaAP/Passwd_rhel
Browse files Browse the repository at this point in the history
Added fix for passwd: Authentication token manipulation error
  • Loading branch information
Power Cloud Robot authored Oct 18, 2023
2 parents 93a0821 + 88f965b commit 8a0c2f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/image/qcow2ova/prep/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ echo "nameserver 9.9.9.9" | tee /etc/resolv.conf
{{if eq .Dist "rhel"}}
subscription-manager register --force --auto-attach --username={{ .RHNUser }} --password={{ .RHNPassword }}
{{end}}
{{if .RootPasswd }}
echo {{ .RootPasswd }} | passwd root --stdin
{{end}}
yum update -y && yum install -y yum-utils
yum install -y cloud-init
yum reinstall grub2-common -y
Expand Down Expand Up @@ -67,9 +70,6 @@ do
done
grub2-mkconfig -o /boot/grub2/grub.cfg
rm -rf /etc/sysconfig/network-scripts/ifcfg-eth0
{{if .RootPasswd }}
echo {{ .RootPasswd }} | passwd root --stdin
{{end}}
{{if eq .Dist "rhel"}}
subscription-manager unregister
subscription-manager clean
Expand Down

0 comments on commit 8a0c2f7

Please sign in to comment.