Bug 33439

Summary: passwd without username changes password for another user under su -
Product: Branch p8 Reporter: Ivan Zakharyaschev <imz>
Component: passwdAssignee: Andrey Cherepanov <cas>
Status: CLOSED NOTABUG QA Contact: qa-p8 <qa-p8>
Severity: major    
Priority: P3    
Version: не указана   
Hardware: all   
OS: Linux   
Bug Depends on: 33440    
Bug Blocks:    

Description Ivan Zakharyaschev 2017-05-01 12:24:19 MSK
$ rpm -qf "$(which passwd)" "$(which su)"
passwd-1.0.13-alt1
su-0.60-alt34
$ apt-cache depends passwd | sed -nre 's:^    ::p' | sort -u
control-0.7.6-alt1
glibc-core-6:2.23-alt3
libpam0-1.3.0-alt1
pam0-config-1.7.0-alt1
pam-config-1.7.0-alt1
sh-3.2.57-alt1
tcb-utils-1.1-alt1
$ 

I expect to change the password for root, but passwd without username changes password for another user under "su -":

imz@rollerderby ~ $ su -
Password: 
rollerderby ~ # passwd
passwd: updating all authentication tokens for user imz.

...

(First, I didn't notice that the username is written in the message and couldn't understand what was happening!)
Comment 1 Ivan Zakharyaschev 2017-05-01 13:54:48 MSK
This has been a specific "feature" for a long time -- https://bugzilla.altlinux.org/show_bug.cgi?id=33440#c3 .