Article View: comp.sys.sun
Article #8750Bug in /usr/etc/install/add_user in SunOS 4.1.1
From: Dan Kegel
Date: Thu, 27 Jun 1991 20:22
Date: Thu, 27 Jun 1991 20:22
26 lines
1288 bytes
1288 bytes
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
Technical Details
Message-ID:
<4148@brchh104.bnr.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: dank@blacks.jpl.nasa.gov (Dan Kegel) Newsgroups: comp.sys.sun Subject: Bug in /usr/etc/install/add_user in SunOS 4.1.1 Keywords: No Digest Subjects during Flush Message-ID: <4148@brchh104.bnr.ca> Date: 27 Jun 91 20:22:00 GMT Sender: news@brchh104.bnr.ca Organization: Sunspots, Flush Mode Lines: 27 Approved: sun-spots@rice.edu X-Original-Date: Thu, 20 Jun 91 09:37:09 PDT