SUMMARY: Problems with passwd map in NIS (or YP)

From: Ricardo Marek (ricky@FibHaifa.com)
Date: Thu May 21 1992 - 07:46:51 CDT


Hi,

Here is the Summary I Promissed:

First Question:
>
> Users want to change their own passwd via yppasswd ( or passwd -y)
> but maps are not made.. (make in /usr/etc/rpc.yppasswdd fails)
> started on /etc/rc.local.

Reason:
        This bug has been known for a long time, but sun hasn't bothered
        to repair it. The problem is, it seems to ignore the first
        argument that begins with a '-'.

Solutions: (An elegant one, From a FAQ list of sun-manager)
        There is a bug in 4.1 rpc.yppasswdd that causes it to misinterpret
        the command line arguments. A work-around is to add the
        "-nosingle" flag (which is the default), this shifts the
        arguments over one, so "passwd" is read instead of "-m".
        For example:
           rpc.yppasswdd /var/yp/passwd -nosingle -m passwd DIR=/var/yp
        Just to move -m to be 3rd argument. Some version of yppasswdd
        had a problem with parsing -m as second argument.

Second Question:
>
> How can I put /etc/passwd in other directory, and leave the
> other maps in the traditional /etc directory? ( aliases,
> services, etc..)

Solutions:
- Use symbolic links for the maps you don't want to move from /etc,
  That is, create symbolic links in /var/yp/etc back to the real
  files in /etc for the maps. So you don't get separate copies of
  them.
- (Or) Edit the /var/yp/Makefile, The `passwd' file may be located
  in any place, **BUT** don't remove /etc/passwd!.
  Look for all occurrences of "passwd" in that file, but don't confuse
  the instance of the passwd file with the passwd target for the
  makefile. The passwd file instances all look like "$DIR/passwd",
  change them so that you end up with "$MY_DIR/passwd" (define MY_DIR in
  the beginning of the makefile...).
  Finally, change the invocation of the rpc.yppasswdd in /etc/rc.local
  to reflect the new file to update:
      /usr/etc/rpc.yppasswdd /my/dir/passwdyp -nosingle -m \
           passwd; echo -n ' yppasswdd'

  (describe the full pathname corresponding to MY_DIR)

All this thanks to:
- xcea@uxa.ecn.bgu.edu (Chad Adams)
- visti@lusmu.cs.hut.fi (Hannu Visti)
- paulo%dcc.unicamp.br@UICVM.UIC.EDU (Paulo L. de Geus)
- birger@vest.sdata.no ( Birger Wathne)
 (I apologize if I forgot someone in advance!)

--- Ricky Marek.

-- 
Ricky Marek (System Manager)
Fibronics Ltd., Matam Industrial Park, Haifa 31905, ISRAEL
phones: +972-4-313690            Fax: +972-4-550550
e-mail: ricky@FibHaifa.com   or  ricky@fibronics.UUCP



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:42 CDT