Bug 672510 - newgrp command : Invalid password.
Summary: newgrp command : Invalid password.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: shadow-utils
Version: 6.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Vrabec
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-25 11:58 UTC by xingxing
Modified: 2011-12-06 16:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 16:27:43 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1650 0 normal SHIPPED_LIVE shadow-utils bug fix and enhancement update 2011-12-06 00:50:28 UTC

Description xingxing 2011-01-25 11:58:54 UTC
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:

Comment 2 RHEL Program Management 2011-01-25 12:28:26 UTC
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.

Comment 3 Anthony Thyssen 2011-04-13 04:43:16 UTC
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.

Comment 7 errata-xmlrpc 2011-12-06 16:27:43 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.

http://rhn.redhat.com/errata/RHBA-2011-1650.html


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