Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Creating ISO image with type `image-installer` when we specify "root" user/password in the blueprint, the resulting ISO has the Kickstart file entry "osbuild.ks" creating with the `user` kickstart command for "root" user.
My blueprint,
~~~
# composer-cli blueprints show test-blueprint
name = "test-blueprint"
description = "Test blueprint"
version = "0.0.1"
packages = []
modules = []
groups = []
distro = ""
[customizations]
[[customizations.user]]
name = "root"
password = "$6$3vPBbx.xfSL/Cvth$T/M4AecT5pAAUtU3oZw7UCN5J8lTeUR8VHRh34XEY61nBVjrkRM5oKeNTw2d2DCT9/E9KbTdMk3Rzmk1lVJuU0"
home = "/root"
shell = "/usr/bin/bash"
~~~
The resulting ISO contains the Kickstart with "user" command.
~~~
$ cat ~/ISO/osbuild.ks
liveimg --url file:///run/install/repo/liveimg.tar
user --name root --password $6$3vPBbx.xfSL/Cvth$T/M4AecT5pAAUtU3oZw7UCN5J8lTeUR8VHRh34XEY61nBVjrkRM5oKeNTw2d2DCT9/E9KbTdMk3Rzmk1lVJuU0 --iscrypted --shell /usr/bin/bash --homedir /root
~~~
This does not work because the "user" kickstart command can only be used to set password for normal user and not root user.
The command user for root user password is "rootpw" as per the Kickstart documentation.
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/system_design_guide/index#rootpw-required_kickstart-commands-for-system-configuration
On the installed system we are not able to login and upon booting the system to rescue mode, we can inspect the root filesystem and see that
Root password is indeed not set and root account is hence locked.
~~~
# cat /etc/shadow | grep root
root:!::0:99999:7:::
~~~
During installation with this ISO, we see that the following in the Anaconda GUI,
~~~
USER SETTINGS
Root Password
Root account is disabled
User Creation
User root will be created
~~~
It does allow for manually setting the root password from the GUI here though.
Version-Release number of selected component (if applicable):
~~~
# rpm -qa | grep osbuild
osbuild-composer-core-62-3.el8_7.x86_64
osbuild-composer-62-3.el8_7.x86_64
osbuild-composer-dnf-json-62-3.el8_7.x86_64
osbuild-lvm2-65-1.el8.noarch
osbuild-65-1.el8.noarch
osbuild-luks2-65-1.el8.noarch
osbuild-selinux-65-1.el8.noarch
osbuild-composer-worker-62-3.el8_7.x86_64
osbuild-ostree-65-1.el8.noarch
python3-osbuild-65-1.el8.noarch
~~~
How reproducible:
Everytime we build compose type to "image-installer" for creating ISO
Steps to Reproduce:
1. Create a Blueprint with [[customization.user]] entry for root user. Create an image-installer type compose for creating ISO and download the ISO
~~~
# composer-cli blueprints show test-blueprint
name = "test-blueprint"
description = "Test blueprint"
version = "0.0.1"
packages = []
modules = []
groups = []
distro = ""
[customizations]
[[customizations.user]]
name = "root"
password = "$6$3vPBbx.xfSL/Cvth$T/M4AecT5pAAUtU3oZw7UCN5J8lTeUR8VHRh34XEY61nBVjrkRM5oKeNTw2d2DCT9/E9KbTdMk3Rzmk1lVJuU0"
home = "/root"
shell = "/usr/bin/bash"
~~~
# composer-cli compose start test-blueprint image-installer
# composer-cli compose image <UUID>
2. Mount the ISO and verify the Kickstart file created and verify the kickstart file created has the root user being created with the "user" command and there is no "rootpw" command.
# mkdir ~/ISO
# mount -v <UUID>-installer.iso ~/ISO
# cat ~/ISO/osbuild.ks
3. Use this ISO for installing a new machine and try login as root user and it should fail.
Actual results:
System is not allowing login through root user because password is not set for root user.
Expected results:
To set the root password correctly and allow login to root user.
Additional info:
This is only occuring for "image-installer" type compose.
I was able to create qcow2 image which has the correct root password set with this same blueprint when I boot this image
I also created an AMI image I was not able to boot AMI as I do not have an AWS account, but the raw image file created by osbuild-composer could be mounted and inspect the /etc/shadow and see that the root password is set.
Comment 1RHEL Program Management
2023-09-18 13:41:59 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.
Comment 2RHEL Program Management
2023-09-18 13:43:53 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.
Due to differences in account names between systems, some fields were not replicated. Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.
To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer. You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:
"Bugzilla Bug" = 1234567
In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.