Bug 19045 - yppasswd unable to change passwd on HPUX nis server
Summary: yppasswd unable to change passwd on HPUX nis server
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: yp-tools   
(Show other bugs)
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact: Aaron Brown
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-13 13:13 UTC by Jorit Dorn
Modified: 2007-04-18 16:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-03-19 15:43:56 UTC
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 13:15 UTC, Jorit Dorn
no flags Details | Diff

Description Jorit Dorn 2000-10-13 13:13:11 UTC
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 13:15:01 UTC
Created attachment 4124 [details]
The patch file

Comment 2 Alexander Larsson 2002-03-25 16:17:32 UTC
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.