[comp.sys.sun] Bug in /usr/etc/install/add_user in SunOS 4.1.1

dank@blacks.jpl.nasa.gov (Dan Kegel) (06/28/91)

Environment: SunOS 4.1.1b
Problem: /usr/etc/install/add_user won't allow adding an account with
	a UID equal to an existing GID.  Should only check against UIDs,
	as the two number spaces are independant.
Reported-By: Dan Kegel (dank@blacks.jpl.nasa.gov)
Fix:	Apply following patch:

*** add_user.orig       Thu Jun 20 09:27:38 1991
--- add_user    Thu Jun 20 09:31:03 1991
***************
*** 99,105 ****
        exit 1;
  fi
  # check if uid already exists
! if grep -s ".*:.*:${uid}:" ${Passwd} ; then
        echo "uid: ERROR: ${uid} already in ${Passwd}";
        exit 1;
  fi
--- 99,105 ----
        exit 1;
  fi
  # check if uid already exists
! if cut -d: -f3 < ${Passwd} | grep -s -w {uid} ; then
        echo "uid: ERROR: ${uid} already in ${Passwd}";
        exit 1;
  fi