Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 448204 - sys-apps/shadow[pam] - 'newusers' does not correctly update /etc/shadow
Summary: sys-apps/shadow[pam] - 'newusers' does not correctly update /etc/shadow
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://bugs.archlinux.org/task/16802
Whiteboard:
Keywords: STABLE
Depends on:
Blocks:
 
Reported: 2012-12-22 18:07 UTC by Sergey Popov
Modified: 2013-07-27 05:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Popov gentoo-dev 2012-12-22 18:07:37 UTC
In last stable sys-apps/shadow(did not check other versions, possibly they are affected too) /usr/sbin/newusers does not add encrypted passwords for users in /etc/shadow.

For example:

echo 'test:VeryDifficultPassword111:1000:100::/home/test:/sbin/nologin' | newusers

gave such result:

/etc/passwd:
test:x:1000:100::/home/test:/sbin/nologin

/etc/shadow:
test:!:15696:0:99999:7:::

Note the '!' sign in password field. I would wait something like this:
test:$6$0rRjlaMO$WLrbLqDWHTh7NfnrqaZ4zQ/1S921Fkw3oDci7isoRMeipcGaclKvqTlWb3xKXNMQx6xAQEgcMSu52ijbU.8AG/:15696:0:99999:7:::

Latest string is generated through chpasswd, which seems to work OK.

Probably this can be related to bug on Arch Linux bugzilla(see URL field).
Comment 1 Sergey Popov gentoo-dev 2012-12-22 18:09:46 UTC
Little note: using chpasswd pam file for newusers(just replacing it) "fix" this issue. So, it's probably pam-related bug, i think
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-12-22 18:55:25 UTC
You're right.

Security, please advise.
Comment 3 SpanKY gentoo-dev 2012-12-23 23:11:03 UTC
shadow-4.1.5.1 has been in the tree for a while now.  time to stabilize it.
Comment 4 Sergey Popov gentoo-dev 2012-12-24 07:24:36 UTC
(In reply to comment #3)
> shadow-4.1.5.1 has been in the tree for a while now.  time to stabilize it.

Unfortunately this will not help, cause this versions contains the same pam file as 4.1.3.1. It seems that all versions in tree are affected. Probably this should be reported upstream(if it is not done yet)
Comment 5 Sergey Popov gentoo-dev 2012-12-24 07:30:17 UTC
(In reply to comment #4)
> Probably this should be reported upstream(if it is not done yet)

Forget my previous sentence - problem is in pam file(${FILESDIR}"/pam.d-include/shadow), supplied in portage, not in upstream one
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-12-24 17:16:36 UTC
This is fixed in 4.1.5.1-r1, sorry I did forget to commit it the other day.
Comment 7 Sergey Popov gentoo-dev 2013-07-27 05:52:37 UTC
4.1.5.1-r1 went stable, closing this as FIXED