Bug 1651450

Summary: [RFE] Allow usernames to be numeric when SHADOW_ALLOW_ALL_NUMERIC_USER environment variable is set
Product: Red Hat Enterprise Linux 7 Reporter: Sandeep MJ <sjayapra>
Component: shadow-utilsAssignee: Tomas Mraz <tmraz>
Status: CLOSED ERRATA QA Contact: Filip Dvorak <fdvorak>
Severity: high Docs Contact:
Priority: high    
Version: 7.6CC: abroy, bc_unixadm, cww, dapospis, dbodnarc, dsimes, ebenes, jowood, mthacker, m.verkerk, tmraz, tscherf
Target Milestone: rcKeywords: FutureFeature, Reopened, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: shadow-utils-4.6-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1671670 (view as bug list) Environment:
Last Closed: 2019-08-06 12:47:34 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1671670    

Description Sandeep MJ 2018-11-20 06:41:01 UTC
Description of problem:

The ability to create numeric usernames were removed with the implementation of Bug 1373645.

Customer requests a workaround/override for this to be implemented, perhaps using "/etc/login.defs" 

Version-Release number of selected component (if applicable):
shadow-utils-4.1.5.1-25.el7

Comment 7 Abhijit Roy 2019-01-16 16:17:35 UTC
Hi,

Is there any workaround except downgrading the shadow-util package.

Comment 10 Abhijit Roy 2019-01-22 10:43:41 UTC
Hi Thomas,

Could you please help me how to do that?

Thank you.

Comment 11 Tomas Mraz 2019-01-22 10:56:25 UTC

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

Comment 12 Tomas Mraz 2019-01-22 10:59:46 UTC
This will be fixed as part of the rebase as described in the summary.

When SHADOW_ALLOW_ALL_NUMERIC_USER environment variable is set to any value the useradd command will allow creating user with all-numeric username. This is only temporary measure for RHEL-7, no such override will be available in RHEL-8.

Comment 20 m.verkerk 2019-02-06 10:22:09 UTC
In our organization we use numerical user names. I believe making it harder to create users with numerical user names is solving the problem in a wrong way!

I have been using two workarounds:

Rename valid usernames:
- create a new user with a 'valid' username
- adjust /etc/passwd /etc/shadow and change the username to something definite (numerical)
- rename user's home dir

Downgrading to previous version (4.1.5.1-24):
- Download via https://access.redhat.com/downloads
- yum downgrade shadow-utils-4.1.5.1-24.el7.x86_64.rpm (as root)

I hope there will be a proper configuration option available for future (el8) versions as well.

Comment 21 Thorsten Scherf 2019-02-06 11:17:40 UTC
(In reply to m.verkerk from comment #20)
> In our organization we use numerical user names. I believe making it harder
> to create users with numerical user names is solving the problem in a wrong
> way!
> 
> I have been using two workarounds:
> 
> Rename valid usernames:
> - create a new user with a 'valid' username
> - adjust /etc/passwd /etc/shadow and change the username to something
> definite (numerical)
> - rename user's home dir
> 
> Downgrading to previous version (4.1.5.1-24):
> - Download via https://access.redhat.com/downloads
> - yum downgrade shadow-utils-4.1.5.1-24.el7.x86_64.rpm (as root)
> 
> I hope there will be a proper configuration option available for future
> (el8) versions as well.

Please see https://bugzilla.redhat.com/show_bug.cgi?id=1651450#c12

Comment 22 Tomas Mraz 2019-02-06 11:45:05 UTC
It was a serious mistake that all-numeric user names were ever allowed in RHEL. This was never allowed in the upstream shadow-utils code for good reasons.

Comment 26 errata-xmlrpc 2019-08-06 12:47:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2102

Comment 27 Red Hat Bugzilla 2023-09-15 00:14:06 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days