Bug 1838859 - user from kickstart is not created on ostreesetup based install
Summary: user from kickstart is not created on ostreesetup based install
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-21 22:50 UTC by Tomas
Modified: 2023-05-25 15:31 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-25 15:31:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
anaconda.log (28.55 KB, text/plain)
2020-05-21 22:50 UTC, Tomas
no flags Details
dbus.log (2.92 KB, text/plain)
2020-05-21 22:50 UTC, Tomas
no flags Details
program.log (12.88 KB, text/plain)
2020-05-21 22:51 UTC, Tomas
no flags Details
anaconda.log (28.65 KB, text/plain)
2020-06-18 01:13 UTC, Tomas
no flags Details
program.log (7.91 KB, text/plain)
2020-06-18 01:13 UTC, Tomas
no flags Details
dbus.log (2.92 KB, text/plain)
2020-06-18 01:14 UTC, Tomas
no flags Details
syslog (599.46 KB, text/plain)
2020-06-18 01:15 UTC, Tomas
no flags Details
inst.ks (1.68 KB, text/plain)
2020-06-18 01:18 UTC, Tomas
no flags Details
anaconda-tb (991.21 KB, text/plain)
2020-06-18 01:20 UTC, Tomas
no flags Details
anaconda-tb (991.22 KB, text/plain)
2020-06-18 01:24 UTC, Tomas
no flags Details
tmp.tar (1.94 MB, application/x-tar)
2020-06-18 01:27 UTC, Tomas
no flags Details

Description Tomas 2020-05-21 22:50:25 UTC
Created attachment 1690899 [details]
anaconda.log

Created attachment 1690899 [details]
anaconda.log

I'm running silverblue (ostreesetup) kickstart install, it appears as if  
"user" directive from kickstart is not being processed because when anaconda tries to add "sshkey", 
it gets an error:

dasbus.error.DBusError: set_user_ssh_key: user tomas does not exist

When "sshkey" directive is missing, the installation completes ok, but no user is created, even tough create users task doesn't report any errors (anaconda.log): 

22:24:19,704 INF progress: Create users
22:24:19,706 DBG installation: Task completed: Create users (30/41) (1.0 s)

As a workaround in %post section of kickstart I'm using:

echo "Adding new user"
useradd -g wheel tomas
echo "tomas:changeme" | chpasswd

addons:         com_redhat_kdump
cmdline:        /usr/bin/python3  /sbin/anaconda
cmdline_file:   inst.ks=file:/silverblue-xac3c92v.ks console=ttyS0 rd.driver.pre=loop net.ifnames=0 biosdevname=0 inst.repo=http://192.168.122.1:8000/32/x86_64/
hashmarkername: anaconda
kernel:         5.6.6-300.fc32.x86_64
package:        anaconda-32.24.7
packaging.log:  
product:        Fedora
reason:         dasbus.error.DBusError: set_user_ssh_key: user tomas does not exist
release:        Fedora release 32 (Thirty Two)
version:        32

Comment 1 Tomas 2020-05-21 22:50:54 UTC
Created attachment 1690900 [details]
dbus.log

Comment 2 Tomas 2020-05-21 22:51:58 UTC
Created attachment 1690901 [details]
program.log

Comment 3 Tomas 2020-05-22 04:14:02 UTC
Looking at ks-post.log where I manually add the user, I'm seeing some sss_cache errors, thought it might be related...

Adding new user
(Fri May 22 00:50:04:912531 2020) [sss_cache] [confdb_init] (0x0010): Unable to open config database [/var/lib/sss/db/config.ldb]
Could not open available domains
useradd: sss_cache exited with status 5
useradd: Failed to flush the sssd cache.
(Fri May 22 00:50:04:922126 2020) [sss_cache] [confdb_init] (0x0010): Unable to open config database [/var/lib/sss/db/config.ldb]
Could not open available domains
useradd: sss_cache exited with status 5
useradd: Failed to flush the sssd cache.
(Fri May 22 00:50:05:093113 2020) [sss_cache] [confdb_init] (0x0010): Unable to open config database [/var/lib/sss/db/config.ldb]
Could not open available domains
chpasswd: sss_cache exited with status 5
chpasswd: Failed to flush the sssd cache.
(Fri May 22 00:50:05:101894 2020) [sss_cache] [confdb_init] (0x0010): Unable to open config database [/var/lib/sss/db/config.ldb]
Could not open available domains
chpasswd: sss_cache exited with status 5
chpasswd: Failed to flush the sssd cache.

Comment 4 Vendula Poncova 2020-06-02 10:31:19 UTC
Please, attach all logs (especially the file named syslog) from the installation. You can find them during the installation in /tmp or on the installed system in /var/log/anaconda/. Also the kickstart file would be very useful.

Comment 5 Tomas 2020-06-18 01:13:20 UTC
Created attachment 1697878 [details]
anaconda.log

Comment 6 Tomas 2020-06-18 01:13:51 UTC
Created attachment 1697879 [details]
program.log

Comment 7 Tomas 2020-06-18 01:14:11 UTC
Created attachment 1697880 [details]
dbus.log

Comment 8 Tomas 2020-06-18 01:15:34 UTC
Created attachment 1697881 [details]
syslog

As requested adding syslog, apologies for not including it from the start

Comment 9 Tomas 2020-06-18 01:18:44 UTC
Created attachment 1697882 [details]
inst.ks

Comment 10 Tomas 2020-06-18 01:20:31 UTC
Created attachment 1697883 [details]
anaconda-tb

Comment 11 Tomas 2020-06-18 01:24:59 UTC
Created attachment 1697884 [details]
anaconda-tb

Comment 12 Tomas 2020-06-18 01:27:06 UTC
Created attachment 1697885 [details]
tmp.tar

files in /tmp dir during the install

Comment 13 Vladimír Slávik 2020-06-30 13:51:07 UTC
Hello Colin, do you have any ideas about this?

Comment 14 Colin Walters 2020-07-02 00:18:57 UTC
Not offhand; first is this a regression?  Did it work at one point?

Could it be the sshkey and useradd sections are processed serially and the useradd needs to be first?

Does Anaconda not invoke `/usr/sbin/useradd` as a subprocess anymore?  Are there logs from that?

Comment 15 Vendula Poncova 2020-07-02 16:41:01 UTC
From syslog:

00:28:23,124 WARNING org.fedoraproject.Anaconda.Modules.Users:DEBUG:anaconda.modules.users.users:A new user list has been set: [UserData(gecos='', gid=-1, groups=['wheel', 'users'], homedir='', is_crypted=False, lock=False, name='tomas', password_set=True, shell='', uid=-1)]

00:56:02,768 WARNING org.fedoraproject.Anaconda.Modules.Users:INFO:anaconda.threading:Running Thread: AnaTaskThread-CreateUsersTask-1 (140503120205568)
00:56:02,772 WARNING org.fedoraproject.Anaconda.Modules.Users:INFO:program:Running... groupadd -R /mnt/sysroot users
00:56:02,803 NOTICE audit:ADD_GROUP pid=3997 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 msg='op=add-group acct="users" exe="/usr/sbin/groupadd" hostname=? addr=? terminal=? res=failed'
00:56:02,804 WARNING org.fedoraproject.Anaconda.Modules.Users:INFO:program:groupadd: group 'users' already exists
00:56:02,806 WARNING org.fedoraproject.Anaconda.Modules.Users:DEBUG:program:Return code: 9
00:56:02,806 WARNING org.fedoraproject.Anaconda.Modules.Users:WARNING:anaconda.modules.users.installation:Group users already exists
00:56:02,806 WARNING org.fedoraproject.Anaconda.Modules.Users:INFO:anaconda.threading:Thread Done: AnaTaskThread-CreateUsersTask-1 (140503120205568)

It looks like Anaconda fails to determine that the group 'users' already exists, so it will try to create it itself. That fails and aborts the rest of the installation task that is supposed to create the user 'tomas'. We should make the logic more robust.

Anyway, the bug doesn't seem to be related to the RPM OSTree payload.

Comment 16 Fedora Program Management 2021-04-29 16:27:08 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 17 Ben Cotton 2021-05-25 16:18:32 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 18 Vendula Poncova 2021-09-16 14:43:10 UTC
We haven't changed anything related to the user creation, so the bug is probably still there.

Comment 19 Ben Cotton 2022-02-08 21:40:34 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 20 Ben Cotton 2023-04-25 16:40:17 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 21 Ludek Smid 2023-05-25 15:31:12 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.