From brewhq!uucpgate.hrz.th-darmstadt.de!infm.ulst.ac.uk!tjarls Mon Sep 12 16:02:58 1994
Return-Path: <brewhq!uucpgate.hrz.th-darmstadt.de!infm.ulst.ac.uk!tjarls>
Received: from brewhq by monad.swb.de  with uucp
	(smail3.1.28.1 #1) id m0qkBy8-000KnBC; Mon, 12 Sep 94 16:02 MET DST
Received: from uucpgate.hrz.th-darmstadt.de by brewhq.swb.de  with uucp
	(Linux Smail3.1.28.1 #1) id m0qkAOM-0005AnC; Mon, 12 Sep 94 14:21 MET DST
Received: from rs2.hrz.th-darmstadt.de by modem.hrz.th-darmstadt.de  with smtp
	(/\==/\ Smail3.1.28.1 #28.6) id <m0qk8ce-0005N7C>; Mon, 12 Sep 94 12:28 MEST
Received: from petrel.infm.ulst.ac.uk by rs2.hrz.th-darmstadt.de with SMTP id AA15866
  (5.65c/IDA-1.4.4 for <okir@monad.swb.de>); Mon, 12 Sep 1994 12:28:18 +0200
Received: (from tjarls@localhost) by petrel.infm.ulst.ac.uk (8.6.9/8.6.9) id LAA02713 for okir@monad.swb.de; Mon, 12 Sep 1994 11:27:22 +0100
Received: from Messages.8.5.N.CUILIB.3.45.SNAP.NOT.LINKED.petrel.infm.ulst.ac.uk.i386.Linux
          via MS.5.6.petrel.infm.ulst.ac.uk.i386_Linux;
          Mon, 12 Sep 1994 11:27:21 +0100 (BST)
Message-Id: <wiR2o9Vz00018_XUpB@petrel.infm.ulst.ac.uk>
Date: Mon, 12 Sep 1994 11:27:21 +0100 (BST)
From: Charles Lopes <tjarls@infm.ulst.ac.uk>
To: okir@monad.swb.de
Subject: Re: yppasswdd + shadow
In-Reply-To: <m0qjSNv-000KmNC@monad.swb.de>
References: <m0qjSNv-000KmNC@monad.swb.de>
Status: RO

Hi Olaf!
Excerpts from mail: 10-Sep-94 Re: yppasswdd + shadow okir@monad.swb.de (504*)


> Hi Charles,
> > 
> > Hi!
> > I've managed to add shadow support to yppasswdd-0.1 so /etc/shadow gets
> > updated. As you said, Olaf, it was straightforward. My yp.pwupdate

> I'll merge your patches into yppasswdd, and make another release. Can you
> send me your pwupdate script, too? If it's similar to mine, we can 
> probably merge them as well.

Here are the minimal changes I made. It works only because I changed the
yp Makefile to use /etc/npasswd instead of /etc/passwd.
--- yp.pwupdate~        Mon Sep 12 11:10:43 1994
+++ yp.pwupdate Mon Sep 12 10:53:58 1994
@@ -21,10 +21,11 @@
     fi
 done
 
-cd /var/yp
 mtemp=/tmp/ypw.tmp.$$
 merr=/tmp/ypw.err.$$
 
+cd /etc;pwunconv >>$merr
+cd /var/yp
 for dir in *; do
     if [ -d $dir -a "$dir" != "binding" ]; then
        (
@@ -37,6 +38,7 @@
        )
     fi
 done
+rm /etc/npasswd
 
 if [ -s $merr ]; then
     (

I made another small change to yppasswdd.c in order to compile with the
newest libraries that doesn't define _PATH_SHADOW anymore. Here it is:
--- yppasswdd.c~	Mon Sep 12 10:37:32 1994
+++ yppasswdd.c	Mon Sep 12 10:37:32 1994
@@ -52,6 +52,7 @@
 #define _PATH_PASSWD    "/tmp/passwd"
 #define _PATH_OLDPASSWD "/tmp/passwd.OLD"
 #define _PATH_PTMP  "/tmp/ptmp"
+#define _PATH_SHADOW "/tmp/shadow"
 #else
 #ifndef _PATH_PASSWD
 #define _PATH_PASSWD    "/etc/passwd"
@@ -61,6 +62,9 @@
 #endif
 #ifndef _PATH_PTMP
 #define _PATH_PTMP  "/etc/ptmp"
+#endif
+#ifndef _PATH_SHADOW
+#define _PATH_SHADOW "/etc/shadow"
 #endif
 #endif
 
I noticed that yppasswd should be changed as well to check the old
password against the shadow passwd. Right now it won't work if the user
changing its password is a local user and /etc/nsswitch.conf defines
"passwd:	files nis" in this order. I'll make the required changes when
I'll find time sometime this week if you want.

> Cheers,
> Olaf
> -- 
Olaf Kirch         |  --- o --- Nous sommes du soleil we love when we play
Isn't that an extract from a Laurent Woultzy song? You don't speak
french per chance?

	Cheerio,
		Charley


 ------------------
 Charles Lopes                       | Internet: Charles.Lopes@infm.ulst.ac.uk
 Computing Officer                   | Phone: +44 (0504) 265621
 Faculty of Informatics              | Phone extension: 5315
 Magee College, University of Ulster | Office: MB023

