newgrp fails with "crypt: Invalid argument"
Bug #1355111 reported by
Lorenz
This bug affects 6 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Shadow |
Invalid
|
Undecided
|
|||
shadow (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
entry from /etc/passwd:
user:x:
entry from /etc/group:
dummy:x:200:user
entry from /etc/gshadow:
dummy:*::
logged on as user the command
"newgrp dummy" asks for a password and fails with "crypt: Invalid argument"
after removing the line for dummy from gshadow newgrp works
A similar bug was reported on the redhat tracker: https:/
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
affects: | ubuntu → shadow (Ubuntu) |
tags: | added: regression-release trusty |
Changed in shadow: | |
importance: | Unknown → Undecided |
status: | Unknown → Invalid |
To post a comment you must log in.
Description of problem:
newgrp fails with "crypt: Invalid argument" even when the correct password is given
Version-Release number of selected component (if applicable): utils-4. 1.5.1-5. fc19
shadow-
glibc-2.17.11.fc19
How reproducible:
100%
Steps to Reproduce:
1. Create a new group without a password, or use an existing group that doesn't have a password. I happened to discover this using the "mock" group.
2. Add a already logged-in user to a group in /etc/group.
3. Note that the current user login session is not a member of that group, i.e., by using the "id" command at a shell prompt
4. Issue a "newgrp <groupname>" command.
5. When prompted, enter the user's password.
Actual results:
crypt: Invalid argument
Expected results:
user gets a subshell with the group in the group list (as shown by the "id" command)
Additional info: /alioth. debian. org/tracker/ index.php? func=detail& aid=314234
This is due to a change in behavior in crypt() in glibc 2.17. It has been reported upstream along with a patch that fixes it:
https:/
I have locally rebuilt the RPM with that patch added, and it solves the crypt problem. The patch applied cleanly with -p1.
Note that with the crypt problem solved, newgrp then gives different errors:
setgroups: Operation not permitted
setgid: Operation not permitted
However, that is a completely independent bug or configuration error that I am still investigating.