Bug 1196265

Summary: User accounts are created with the former usergroup model
Product: [openSUSE] openSUSE Tumbleweed Reporter: Peter <mpeter.68m0y>
Component: YaST2Assignee: YaST Team <yast-internal>
Status: CONFIRMED --- QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: ancor
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
URL: https://trello.com/c/mMzcfvEp
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Peter 2022-02-21 17:56:43 UTC
User-Agent:       Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0
Build Identifier: 

When creating a new user account with the "User and Group Management" module of YaST, it won't create an individual group for the user with the same name, but instead it will set the "users" group as the default group for the user.

Reproducible: Always

Steps to Reproduce:
1. Open the YaST GUI
2. Select "User and Group Management" from the list
3. Click "Add" at the bottom left corner
4. Fill in the fields, click "Ok"
Actual Results:  
The default group of the new user account is "users", and there is no usergroup with the name of the new user.

Expected Results:  
The default group of the new user account is the usergroup with the same name.

I was informed that recently you changed how you set up the system for usergroups. This bug is related to that change.
A relevant issue might be this one: https://bugzilla.opensuse.org/show_bug.cgi?id=1196264
Comment 1 Ancor Gonzalez Sosa 2022-02-22 13:19:38 UTC
First of all, for some context about the mentioned change see https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/Q4HHJJJBLQEGAMEAP3HGHLF2IF4VEVBU/

More than a bug, this is a consequence of how YaST2 Users work (eg. how its user interface is designed). With the current UI, it would be kind of unexpected that clicking "Add" in the users tab would also produce a new entry in the groups one.

Moreover, YaST simply relies on the configuration returned by "useradd -D" which, unfortunately, provides a very partial view on how things work. For example, it still reports "users" as the default group... which is true since that's still the default group... but it's kind of pointless because with USERGROUPS_ENAB set to true at /usr/etc/login.defs that default group is ignored.

So this is a complex topic. YaST Users was not created to honor all the possible situations that can be configured by tweaking the login.defs configuration.

We will discuss it internally in the team and will decide how to proceed.