|
Bugzilla – Full Text Bug Listing |
| Summary: | YaST:Head/yast2-users: Cannot create new user groups via YaST on new installations | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | B <reiokorn> |
| Component: | YaST2 | Assignee: | YaST Team <yast-internal> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Major | ||
| Priority: | P3 - Medium | CC: | reiokorn |
| Version: | Current | ||
| Target Milestone: | --- | ||
| Hardware: | x86-64 | ||
| OS: | openSUSE Tumbleweed | ||
| URL: | https://trello.com/c/IEHa2Ffx | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
y2log
logs hwinfo login.defs |
||
|
Description
B
2022-11-26 16:51:57 UTC
I just checked, and it works absolutely fine for me. Please attach y2logs; see https://en.opensuse.org/openSUSE:Report_a_YaST_bug#I_reported_a_YaST2_bug,_and_now_I_am_asked_to_"attach_y2logs"_(for_package_installation_also_"libzypp_logging")._What_does_that_mean,_and_how_do_I_do_that? Also, are you using Wayland or X11? (In reply to Stefan Hundhammer from comment #2) > Also, are you using Wayland or X11? Wayland I fixed it by reinstalling the yast2 packages - looks like the issue was on my side. I was wrong, reinstalling the packages did not solve the problem. But like you, my old installation does not seem to have the problem, and only new installations are affected, this I have now been able to confirm when I just quickly booted into one. Created attachment 863173 [details]
y2log
Please add y2logs as described in the FAQ. https://en.opensuse.org/openSUSE:Report_a_YaST_bug#Attachments_-_y2logs,_hwinfo_etc. That's why I (!) wrote that FAQ 20 years ago. Created attachment 863208 [details]
logs
OK!
Created attachment 863209 [details]
hwinfo
OK, this is weird: 2022-11-30 13:45:29 <2> tumbleweed-pc(3913) [Perl] modules/Users.pm(Users::CheckGroupname):5027 groupname testgroup doesn't match to 2022-11-30 13:45:31 <2> tumbleweed-pc(3913) [Perl] modules/Users.pm(Users::CheckGroupname):5027 groupname testgroup doesn't match to 2022-11-30 13:45:33 <2> tumbleweed-pc(3913) [Perl] modules/Users.pm(Users::CheckGroupname):5027 groupname testgroup doesn't match to Where it SHOULD also log the character class: https://github.com/yast/yast-users/blob/master/src/modules/Users.pm#L5027 y2warning ("groupname $groupname doesn't match to $character_class"); i.e. that $character_class is empty (!), so of course it doesn't match. It's defined here: https://github.com/yast/yast-users/blob/master/src/modules/Users.pm#L172 my $character_class = "[[:alpha:]_][[:alnum:]_.-]*[[:alnum:]_.\$-]\\?"; which *might* be influenced by the current locale settings; or if that locale isn't installed at all or not correctly, it might possibly be empty. That initial value is overwritten later with data from (AFAICS) /etc/login.defs: https://github.com/yast/yast-users/blob/master/src/modules/Users.pm#L1345-L1348 $character_class = ShadowConfig->fetch("CHARACTER_CLASS"); if ($character_class) { UsersSimple->SetCharacterClass ($character_class); } which look OK on my system: % grep '^CHARACTER_CLASS' /etc/login.defs CHARACTER_CLASS [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_][ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-]*[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.$-]\? How about your system? Is that file there? Does that CHARACTER_CLASS entry look OK? The file might also be /usr/etc/login.defs, or there might be a directory /usr/etc/login.defs.d . Created attachment 863224 [details]
login.defs
The file /etc/login.defs is there, however it doesn't include any type of CHARACTER_CLASS
I would like to point out again that this is the default file after a new installation.
(In reply to Stefan Hundhammer from comment #10) > The file might also be /usr/etc/login.defs, or there might be a directory > /usr/etc/login.defs.d . Yes, it was under /usr/etc login.defs.d was empty OK, thank you. So we need to find out why the entry is no longer there, and why we don't have a fallback in just that case. The code from comment #9 looks fishy anyway: $character_class = ShadowConfig->fetch("CHARACTER_CLASS"); if ($character_class) { UsersSimple->SetCharacterClass ($character_class); } What if $character_class is empty? Then it remains empty, and the result is what we ear seeing in this bug. (In reply to Stefan Hundhammer from comment #13) > what we ear seeing in this bug. ^^^ are Fingers faster than brain make for bad typing... ;-( Moving to our Trello task queue. Now that the problem is identified, it should be easy enough to fix. Thank you for your contribution! Pull request with a fix: https://github.com/yast/yast-users/pull/371 This will become available with yast2-users-4.5.3. (In reply to Stefan Hundhammer from comment #17) > Pull request with a fix: > > https://github.com/yast/yast-users/pull/371 > > This will become available with yast2-users-4.5.3. Thank you! |