Bug 1191189

Summary: Yast2 - missing defaults for "Defaults for New Users"
Product: [openSUSE] openSUSE Tumbleweed Reporter: Ian Powell <bingmybong>
Component: YaST2Assignee: E-mail List <yast2-maintainers>
Status: RESOLVED DUPLICATE QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: ancor, kanderssen, rs.opensuse
Version: Current   
Target Milestone: ---   
Hardware: 64bit   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ian Powell 2021-09-30 13:55:33 UTC
I created a new user in Yast2 without checking the "Defaults for New Users" as i've created users in the past with no issues. I've not created a user for a few years so i have no idea when this became a problem.

Background:
I tried to log in with this new user but got an Xsession error (looked like  a format from the 1980s) saying its disabled but i can login via terminal session. The only way to clear that Xsession error is to Ctrl Backspace Backspace, it does have an "okay" button on the message but its unclickable and un-escapeable or any key.

Solution
I then went back and checked the list of users in Yast2 and my new one did not belong to any groups. I checked "Defaults for New Users" and saw "users" was the default group but the "Default Login Shell" and "Skeleton for Home Directory" were blank.  I put in /usr/bin/bash and  /etc/skel, deleted the old user and created a new one which allowed me to login fine.
Comment 1 robert spitzenpfeil 2021-09-30 16:17:07 UTC
Probably related to Bug 1190864
Comment 2 Ancor Gonzalez Sosa 2021-10-01 08:29:12 UTC
The file /etc/default/useradd was recently dropped from the shadow package and YaST was not prepared for that. See bug#1190864 for some details.

The bright side is that we are just right now working to improve yast2-users to handle that situation better (by fully relying on "useradd" and whatever mechanisms it implements now or in the future).

As a temporary workaround, you can run this once and I think it will generate the file yast2-users expects:

> useradd -D -b /home
Comment 3 Ian Powell 2021-10-01 08:40:08 UTC
(In reply to Ancor Gonzalez Sosa from comment #2)
> The file /etc/default/useradd was recently dropped from the shadow package
> and YaST was not prepared for that. See bug#1190864 for some details.
> 
> The bright side is that we are just right now working to improve yast2-users
> to handle that situation better (by fully relying on "useradd" and whatever
> mechanisms it implements now or in the future).
> 
> As a temporary workaround, you can run this once and I think it will
> generate the file yast2-users expects:
> 
> > useradd -D -b /home

Thanks.  I added the defaults manually and let me create a valid user
Comment 4 Ian Powell 2021-10-01 08:42:01 UTC
(In reply to Ancor Gonzalez Sosa from comment #2)
> The file /etc/default/useradd was recently dropped from the shadow package
> and YaST was not prepared for that. See bug#1190864 for some details.
> 
> The bright side is that we are just right now working to improve yast2-users
> to handle that situation better (by fully relying on "useradd" and whatever
> mechanisms it implements now or in the future).
> 
> As a temporary workaround, you can run this once and I think it will
> generate the file yast2-users expects:
> 
> > useradd -D -b /home

Thanks.  I added the defaults manually and let me create a valid user.

I'm happy for this to be closed as it seems covered by Bug 1190864
Comment 5 Knut Alejandro Anderssen González 2021-10-01 08:51:35 UTC
Closing the bug according to last comments as duplicate of bsc#1190864 at least it is related to it :).

Thanks @ancorgs!

*** This bug has been marked as a duplicate of bug 1190864 ***