RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1298481 - NIS account passwords not disabled when nsAccountLock is TRUE
Summary: NIS account passwords not disabled when nsAccountLock is TRUE
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: slapi-nis
Version: 7.3
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Alexander Bokovoy
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On: 1298478
Blocks: 1313797
TreeView+ depends on / blocked
 
Reported: 2016-01-14 08:58 UTC by Martin Kosek
Modified: 2016-11-04 07:05 UTC (History)
5 users (show)

Fixed In Version: slapi-nis-0.54-6.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1298478
: 1313797 (view as bug list)
Environment:
Last Closed: 2016-11-04 07:05:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2471 0 normal SHIPPED_LIVE slapi-nis bug fix and enhancement update 2016-11-03 14:07:19 UTC

Description Martin Kosek 2016-01-14 08:58:19 UTC
+++ This bug was initially created as a clone of Bug #1298478 +++

This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/5480

When the password algorithm is defined as CRYPT and NIS is used to authenticate users on other systems, there is no way to disable or lock accounts.   Traditional convention has been to put two bang (exclamation) characters in front of the password, creating an impossible password hash.  This effectively locks the user account, preventing authentication.

On line 55 of defs-nis.c, line 55 can have the following added to add a pair of bang characters in front of the password hash:

{{{
%ifeq("nsAccountLock","TRUE","!!","")
}}}

There may be a better place within the format to put that, but the syntax escapes me.  Simply adding the above code in the password field before the %regsubi... would produce a !!* for locked accounts instead of just the * as it sits now.  This may cause problems.

--- Additional comment from Martin Kosek on 2016-01-14 03:56:12 EST ---

The bug needs to be fixed in slapi-nis, in the plugin itself. It is a security related fix, as account lock is not effective in NIS - thus increasing severity.

Comment 7 Kaleem 2016-08-11 09:31:36 UTC
Verified.

IPA Server:
===========
[root@dhcp207-129 ~]# ipa user-disable testuser1
---------------------------------
Disabled user account "testuser1"
---------------------------------
[root@dhcp207-129 ~]# ipa user-enable testuser1
--------------------------------
Enabled user account "testuser1"
--------------------------------
[root@dhcp207-129 ~]# rpm -q ipa-server slapi-nis
ipa-server-4.4.0-7.el7.x86_64
slapi-nis-0.56.0-4.el7.x86_64
[root@dhcp207-129 ~]# 


NIS Client:
===========
[root@dhcp207-90 ~]# ypcat passwd
testuser1:*:1992200001:1992200001:test user1:/home/testuser1:/bin/sh
admin:*:1992200000:1992200000:Administrator:/home/admin:/bin/bash
[root@dhcp207-90 ~]# ypcat passwd
testuser1:!!*:1992200001:1992200001:test user1:/home/testuser1:/bin/sh
admin:*:1992200000:1992200000:Administrator:/home/admin:/bin/bash
[root@dhcp207-90 ~]# ypcat passwd
testuser1:*:1992200001:1992200001:test user1:/home/testuser1:/bin/sh
admin:*:1992200000:1992200000:Administrator:/home/admin:/bin/bash
[root@dhcp207-90 ~]#

Comment 9 errata-xmlrpc 2016-11-04 07:05:27 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://rhn.redhat.com/errata/RHBA-2016-2471.html


Note You need to log in before you can comment on or make changes to this bug.