+++ 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.
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 ~]#
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