Jira (PUP-11789) luseradd with allowdupe broken in latest libuser 0.64

10 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Mar 24, 2023, 1:08:02 PM3/24/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Puppet / Bug PUP-11789
luseradd with allowdupe broken in latest libuser 0.64
Change By: Josh Cooper
Summary: Comply: Defect luseradd with allowdupe broken in latest libuser 0.64
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Tony Vu (Jira)

unread,
Mar 28, 2023, 4:17:02 PM3/28/23
to puppe...@googlegroups.com
Tony Vu commented on Bug PUP-11789
 
Re: luseradd with allowdupe broken in latest libuser 0.64

Hey Jack Low we are little confused by the ticket; could you provide some reproduction steps so it is clearer to us what is being asked for?

Additionally, does using an earlier version of libuser work for you in the meantime?

Jack Low (Jira)

unread,
Mar 28, 2023, 4:55:02 PM3/28/23
to puppe...@googlegroups.com
Jack Low commented on Bug PUP-11789

We have the following in group {} and user {}

allowdupe =>  true
forcelocal =>  true

Using Fedora 37 shipping with libuser 0.63, duplicate user/group account uid/gid add fine.
Using Fedora 38 shipping with libuser 0.64, duplicate user/group account uid/gid returns an error
 
Error: Could not create group user2: Execution of '/usr/sbin/lgroupadd -g 4080 user2' returned 2: Group creation failed: ID 4080 already in use by user
Error: /Stage[main]/Account::User/Account::Create[user2]/Group[user2]/ensure: change from 'absent' to 'present' failed: Could not create group user2: Execution of '/usr/sbin/lgroupadd -g 4080 user2' returned 2: Group creation failed: ID 4080 already in use by user (corrective)
Error: Could not create user user2: Execution of '[redacted]' returned 3: Account creation failed: ID 4080 already in use by user.
Error: /Stage[main]/Account::User/Account::Create[user2]/User[user2]/ensure: change from 'absent' to 'present' failed: Could not create user user2: Execution of '[redacted]' returned 3: Account creation failed: ID 4080 already in use by user. (corrective)

With libuser 0.64, If I add allow_id_duplicates = true under the [files] section of /etc/libuser.conf, the duplicate users/groups add fine on the cli but not with puppet. Puppet is loading /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/libuser.conf which does not have that config directive and is failing to allow duplicate users/groups.

libuser 0.64 changed the default behavior of allowing duplicate uid/gids to false where libuser 0.63 was default of true.

Josh Cooper (Jira)

unread,
Apr 4, 2023, 4:37:03 PM4/4/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11789

Jack Low could you describe why you're wanting to create multiple user accounts with the same UID?

If /etc/libuser.conf is configured with allow_id_duplicates=false, what should puppet do?

Josh Cooper (Jira)

unread,
Apr 4, 2023, 4:38:01 PM4/4/23
to puppe...@googlegroups.com

Jack Low (Jira)

unread,
Apr 4, 2023, 4:54:02 PM4/4/23
to puppe...@googlegroups.com
Jack Low commented on Bug PUP-11789
 
Re: luseradd with allowdupe broken in latest libuser 0.64

With forcelocal => true
1. allowdupe => true should allow duplicate uids. (allow_id_duplicates=true)
2. allowdupe => false should not allow duplicate uids. (allow_id_duplicates=false)

Reply all
Reply to author
Forward
0 new messages