Bug 10027 - % passwd --stdin username fails
% passwd --stdin username fails
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: passwd (Show other bugs)
8.0
All Linux
medium Severity low
: ---
: ---
Assigned To: Jindrich Novy
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-03-07 10:26 EST by Brock Organ
Modified: 2013-07-02 18:54 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-25 18:44:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brock Organ 2000-03-07 10:26:06 EST
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 11:36:59 EDT
assigned to nalin
Comment 2 Stephen John Smoogen 2003-01-25 00:13:51 EST
Still able to replicate in Red Hat Linux 8.0 and Phoebe
Comment 3 Brock Organ 2003-05-16 10:43:37 EDT
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
#

Note You need to log in before you can comment on or make changes to this bug.