Bug 1369979

Summary: user accounts created by shadow-utils-4.3.1 cannot be used ('This account is currently not available')
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: shadow-utilsAssignee: Tomas Mraz <tmraz>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rawhideCC: kevin, pvrabec, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: shadow-utils-4.3.1-2.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-25 11:16:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Adam Williamson 2016-08-24 23:12:29 UTC
If I create a user account:

[root@localhost ~]# useradd -U -G wheel -d /home/test3 -m -c test3 test3

with shadow-utils 4.3.1-1.fc26, I cannot use it:

[root@localhost ~]# su test3
This account is currently not available.

but if I do the same with shadow-utils 4.2.1-11.fc25:

[root@localhost ~]# useradd -U -G wheel -d /home/test2 -m -c test2 test2

it works fine:

[root@localhost ~]# su test2
[test2@localhost root]$ 

This is how anaconda creates user accounts, so a consequence of this is that you cannot log in as any account created by anaconda. This breaks most openQA tests at present (as they tend to try and log in as a regular user after boot).

The offending build isn't in F25, fortunately...

Comment 1 Adam Williamson 2016-08-24 23:15:25 UTC
it seems that 4.3.1 sets the user's shell as /sbin/nologin , while 4.2.1 sets it as /bin/bash .

Comment 2 Adam Williamson 2016-08-24 23:16:42 UTC
'man useradd' claims the default shell is whatever's specified as SHELL= in /etc/default/useradd , but that file says:

SHELL=/bin/bash

i.e. it's not the file that's at fault, it's useradd's reading of it or something.