Hide Forgot
Description of problem: [root@s14 etc]# groupadd haha [root@s14 etc]# gpasswd haha Changing the password for group haha New Password: Re-enter new password: [root@s14 etc]# su - test [test@s14 ~]$ newgrp haha 密码: Invalid password. [test@s14 ~]$ Version-Release number of selected component (if applicable): [test@s14 ~]$ rpm -qf `which newgrp` shadow-utils-4.1.4.2-8.el6.x86_64 How reproducible: Steps to Reproduce: 1.groupadd haha 2.gpasswd haha 3.su - test 4.newgrp haha Actual results: invalid passwd Expected results: ok Additional info:
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. If you would like it considered as an exception in the current release, please ask your support representative.
Debian also have bug reports for this. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569899 they report they uploaded a fix upstream! Also see notes in the fedora Forum http://www.fedoraforum.org/forum/showthread.php?p=1460887#post1460887 Essentually newgrp command is not handling things correctly. Either it is failing to actually open /etc/gshadow for reading (though it is supposed to be SUID to root) and then default to doing a password check in /etc/group. OR its string buffers to hold the encrypted password is not large enough to handle the modern sha512 password. Old DES or MD5 password work from /etc/group Basically the command needs a overhaul.
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. http://rhn.redhat.com/errata/RHBA-2011-1650.html