From owner-freebsd-questions Sun Aug 6 23:53:09 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id XAA19371 for questions-outgoing; Sun, 6 Aug 1995 23:53:09 -0700 Received: from cc.jyu.fi (cc.jyu.fi [130.234.1.3]) by freefall.cdrom.com (8.6.11/8.6.6) with SMTP id XAA19356 for ; Sun, 6 Aug 1995 23:53:02 -0700 Received: from [130.234.41.39] (zaphod.maccc.jyu.fi) by cc.jyu.fi with SMTP id AA25542 (5.67a/IDA-1.4.4 for questions@freebsd.org); Mon, 7 Aug 1995 09:54:51 +0300 X-Sender: kallio@pop.jyu.fi Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 7 Aug 1995 09:55:37 +0300 To: Michael Smith From: kallio@jyu.fi (Seppo Kallio) Subject: Re: Automating removal of users password Cc: wsantee@wsantee.oz.net (Wes Santee), questions@freebsd.org Sender: questions-owner@freebsd.org Precedence: bulk At 11:03 7/8/95, Michael Smith wrote: >Wes Santee stands accused of saying: >> umask 077 >> chdir /etc >> /usr/bin/grep -v ${username} master.passwd > master.passwd.XXXXXX >> /usr/sbin/pwd_mkdb -p master.passwd.XXXXXX >> /bin/rm -f master.passwd.XXXXXX > >That should be grep -v ^${username} ... (Match only at the beginning of >a line) > I would use grep -v "^${username}:" ... So user msmithma is not deleted when you delete msmith Seppo -- +-- Seppo Kallio ----- kallio@jyu.fi ---+ ! Computing Center ! Fax +358-41-603611 Phone +358-41-603606 ! ! University of Jyvaskyla ! http://www.jyu.fi/~kallio ! +-- Finland --+-- 62.14N 25.44E -- +