Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 338591

Summary: sys-apps/shadow-4.1.4.2-r5 stable request
Product: Gentoo Linux Reporter: Robin Johnson <robbat2>
Component: [OLD] Core systemAssignee: PAM Gentoo Team (OBSOLETE) <pam-bugs+disabled>
Status: RESOLVED FIXED    
Severity: blocker CC: base-system, email
Priority: High Keywords: STABLEREQ
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-09-24 19:50:32 UTC
This bug caused me to be locked out of a new system I installed, as I had to root it myself because none of the passwords got set due to this bug.

# grep foo /etc/shadow ; echo foo:awjaxcewFatNusEyb |chpasswd ; echo $? ; grep foo /etc/shadow
foo:!:14868:0:99999:7:::
0
foo:!:14868:0:99999:7:::

Expected result:
That chpasswd actually sets the password for the user.

I've tried with and without NSCD, same result. Nothing in log outputs at all.
Also weirdly, the manpage for chpasswd lists multiple options, but the --help does not.

# chpasswd --help
Usage: chpasswd [options]

Options:
  -h, --help                    display this help message and exit

# which chpasswd
/usr/sbin/chpasswd
# ldd `which chpasswd`
	linux-vdso.so.1 =>  (0x0000039e48634000)
	libpam.so.0 => /lib/libpam.so.0 (0x0000039e4820b000)
	libpam_misc.so.0 => /lib/libpam_misc.so.0 (0x0000039e48007000)
	libc.so.6 => /lib/libc.so.6 (0x0000039e47caa000)
	libdl.so.2 => /lib/libdl.so.2 (0x0000039e47aa6000)
	/lib64/ld-linux-x86-64.so.2 (0x0000039e48418000)

# equery b `which chpasswd`
[ Searching for file(s) /usr/sbin/chpasswd in *... ]
sys-apps/shadow-4.1.4.2-r4 (/usr/sbin/chpasswd)

# emerge -pv sys-apps/shadow
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild   R   ] sys-apps/shadow-4.1.4.2-r4  USE="cracklib pam -audit -nls* (-selinux) -skey" 1,749 kB
Total: 1 package (1 reinstall), Size of downloads: 1,749 kB

Portage 2.1.8.3 (hardened/linux/amd64/10.0, gcc-4.3.4, glibc-2.11.2-r0, 2.6.32-hardened-r14-infra16 x86_64)
=================================================================
System uname: Linux-2.6.32-hardened-r14-infra16-x86_64-Intel-R-_Atom-TM-_CPU_D510_@_1.66GHz-with-gentoo-1.12.13
Timestamp of tree: Fri, 24 Sep 2010 17:30:21 +0000
app-shells/bash:     4.0_p37
dev-lang/python:     2.6.5-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dev.d /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/scsi_id.config /etc/terminfo /etc/udev"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildpkg collision-protect distlocks fixpackages multilib-strict parallel-fetch protect-owned sandbox sfperms split-elog split-log splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/portage.exclude"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups cxx dri gdbm gpm hardened iconv ipv6 jpeg justify libwww maildir mmx modules mudflap multilib ncurses nptl nptlonly openmp pam pcre perl pic png pppd python readline reflection session snmp sse sse2 ssl sysfs tcpd urandom xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="account chaos checksum condition delude dhcpmac echo fuzzy geoip iface ipmark ipp2p ipset ipv4options length2 logmark lscan pknock psd quota2 rawnat steal sysrq tarpit tee" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTDIR_OVERLAY
Comment 1 Fernando (likewhoa) 2010-09-24 20:23:25 UTC
I can confirm this on x86 too and this reminds me of bug 275555 but that fixed doesn't seem to remedy this. Have you tried with -pam to see if chpasswd works?
Comment 2 SpanKY gentoo-dev 2010-09-24 20:25:29 UTC
works fine on my USE=-pam systems.  are you sure Bug 275555 doesnt fix it ?  that change isnt in current stable.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-09-24 20:29:43 UTC
Changing to a stable request, the bug was fixed but it hasn't hit stable yet.
Comment 4 Fernando (likewhoa) 2010-09-24 20:30:31 UTC
(In reply to comment #2)
> works fine on my USE=-pam systems.  are you sure Bug 275555 doesnt fix it ? 
> that change isnt in current stable.
> 

No that doesn't fix it, tried it and chpasswd is still not applying password changes, but I will let robbat2 confirm on his end.
Comment 5 Fernando (likewhoa) 2010-09-24 20:43:31 UTC
yea ma bad, i was editing the wrong file /etc/pam.d/shadow instead of /etc/pam.d/chpasswd
Comment 6 David Abbott (RETIRED) gentoo-dev 2010-09-24 21:24:34 UTC
All good x86.
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2010-09-25 12:16:26 UTC
amd64 done
Comment 8 Markus Meier gentoo-dev 2010-09-26 10:49:23 UTC
x86 stable, thanks David
Comment 9 Brent Baude (RETIRED) gentoo-dev 2010-09-28 00:38:07 UTC
ppc done
Comment 10 Brent Baude (RETIRED) gentoo-dev 2010-10-01 14:51:21 UTC
ppc64 done
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-10-02 02:14:31 UTC
Removing infra since this is fixed on x86/amd64 for us.
Comment 12 Guy Martin (RETIRED) gentoo-dev 2010-10-03 15:59:50 UTC
hppa done
Comment 13 Raúl Porcel (RETIRED) gentoo-dev 2010-10-10 17:12:21 UTC
alpha/arm/ia64/m68k/s390/sh/sparc stable, closing
Comment 14 Gustavo A. Díaz 2010-10-12 17:51:20 UTC
Guys...

This is not working for me yet, even with -r5 installed (I've reported same in #275555):

# echo "user:password" | chpasswd -m

chpasswd: invalid option -- 'm'
Comment 15 SpanKY gentoo-dev 2010-10-12 18:41:24 UTC
do not go spamming unrelated issues to multiple bugs.  plus, this is a stabilization bug, not a report bug.