Bug 19045 - yppasswd unable to change passwd on HPUX nis server
yppasswd unable to change passwd on HPUX nis server
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: yp-tools (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Alexander Larsson
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-13 09:13 EDT by Jorit Dorn
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-03-19 10:43:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The patch file (817 bytes, patch)
2000-10-13 09:15 EDT, Jorit Dorn
no flags Details | Diff

  None (edit)
Description Jorit Dorn 2000-10-13 09:13:11 EDT
Hi,
I found (and fixed a bug) in Red Hat Linux 6.2 (and possibly in 7.0 as
well).

The yppasswd didn't check for the length of the passwd entry (13 chars).
HPUX appends the
password aging information after the password. That causes an error.

The fix:
** yp-tools-2.4/src/yppasswd.c.orig    Fri Oct 22 12:49:45 1999
--- yp-tools-2.4/src/yppasswd.c Fri Oct 13 14:37:51 2000
***************
*** 581,587 ****
        /* We can't check the password with shadow passwords enabled. We
         * leave the checking to yppasswdd */
        if (uid != 0 && strcmp (pwd->pw_passwd, "x") != 0)
!         if (strcmp (crypt (s, pwd->pw_passwd), pwd->pw_passwd))
            {
              fprintf (stderr, _("Sorry.\n"));
            return 1;
--- 581,587 ----
        /* We can't check the password with shadow passwords enabled. We
         * leave the checking to yppasswdd */
        if (uid != 0 && strcmp (pwd->pw_passwd, "x") != 0)
!         if (strncmp (crypt (s, pwd->pw_passwd), pwd->pw_passwd,13))
            {
              fprintf (stderr, _("Sorry.\n"));
            return 1;

Please fix this. Thanks
Jorit
Comment 1 Jorit Dorn 2000-10-13 09:15:01 EDT
Created attachment 4124 [details]
The patch file
Comment 2 Alexander Larsson 2002-03-25 11:17:32 EST
That patch is not correct. It breaks e.g. MD5 passwords.

I've added a patch that should work to yp-tools-2.6-4 (in rawhide soon). I'm
fairly sure it works, but please test it and reopen this bug if it is still broken.


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