Bug 10027

Summary: % passwd --stdin username fails
Product: [Retired] Red Hat Linux Reporter: Brock Organ <borgan>
Component: passwdAssignee: Jindrich Novy <jnovy>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 8.0CC: bugzilla, pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-25 22:44:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brock Organ 2000-03-07 15:26:06 UTC
Create a new user:

[root@test142 /root]# useradd user1
[root@test142 /root]# passwd user1
Changing password for user user1
New UNIX password: <-- change the passwd to "user1" -->
BAD PASSWORD: it is too short
Retype new UNIX password: <--  confirm passwd "user1" -->
passwd: all authentication tokens updated successfully
[root@test142 /root]#

Create a file with the new passwd "foobar" and change the passwd using the
--stdin option:

[root@ultra2 /root]# cat > passwd.foo
foobar
foobar
[root@ultra2 /root]# cat passwd.foo | passwd --stdin user1
Changing password for user user1
passwd: all authentication tokens updated successfully

Now we should be able to login as user1 using new passwd "foobar"

[root@ultra2 /root]# telnet ultra2
Trying 207.175.44.40...
Connected to ultra2.test.redhat.com (207.175.44.40).
Escape character is '^]'.

Red Hat Linux release 6.1.98 (Macomb)
Kernel 2.2.14-5.0 on a sparc64
login: user1
Password: <--- I typed "foobar" here and it failed -->
Login incorrect

login: user1
Password: <--- I retyped "foobar" here (carefully) and it failed -->
Login incorrect

login: Connection closed by foreign host.
[root@ultra2 /root]#

Comment 1 Cristian Gafton 2000-05-22 15:36:59 UTC
assigned to nalin

Comment 2 Stephen John Smoogen 2003-01-25 05:13:51 UTC
Still able to replicate in Red Hat Linux 8.0 and Phoebe

Comment 3 Brock Organ 2003-05-16 14:43:37 UTC
fails in Red Hat Linux 9 ...

# useradd foobar
# cat > p.foo
foobar
foobar
# cat p.foo | passwd --stdin foobar
Changing password for user foobar.
passwd: all authentication tokens updated successfully.
# echo $?
0
#

then login with new pw fails, here is /var/log/messages info:

May 16 09:21:38 borgan xscreensaver[2117]: pam_krb5: authentication succeeds for
`borgan'
May 16 10:41:31 borgan login(pam_unix)[1969]: authentication failure;
logname=LOGIN uid=0 euid=0 tty=tty2 ruser= rhost=  user=foobar
May 16 10:41:31 borgan login[1969]: pam_krb5: authenticate error: Client not
found in Kerberos database (-1765328378)
May 16 10:41:31 borgan login[1969]: pam_krb5: authentication fails for `foobar'
May 16 10:41:33 borgan login[1969]: FAILED LOGIN 1 FROM (null) FOR foobar,
Authentication failure

this fails for kerb database even though foobar acct info is local:

# grep foobar /etc/passwd
foobar:x:5256:5261::/home/foobar:/bin/bash
#