Path: utzoo!attcan!uunet!husc6!bloom-beacon!gatech!rutgers!njin!princeton!njsmu!telesci!fantasci!jep From: jep@fantasci.UUCP (Joseph E Poplawski) Newsgroups: comp.unix.questions Subject: vipw - the program Message-ID: <218@fantasci.UUCP> Date: 16 Oct 88 02:37:55 GMT Reply-To: jep@fantasci.UUCP (Joseph E Poplawski) Organization: Fantasci Incorporated Lines: 49 For those of you who were looking for a copy of 'vipw', here is one that I wrote. I want to thank Mike Khaw (mkhaw@teknowledge.arpa) for his suggestions on what the program should do. Here it is: ---------------------CUT HERE-------------------------------------------------- # vipw # # program to edit the password file. will not allow editing if /etc/ptmp exists. # # written by: Jo Poplawski jep@fantasci.UUCP # if [ "n$EDITOR" = "n" ] then EDITOR=/usr/bin/vi fi if [ -f "/etc/ptmp" ] then echo "" echo "/etc/passwd being used, please try again in a few minutes..." echo "" exit 1 else cat /dev/null >/etc/ptmp cp /etc/passwd /etc/ptmp $EDITOR /etc/ptmp cp /etc/passwd /etc/passwd.old mv /etc/ptmp /etc/passwd chown root /etc/passwd chgrp sys /etc/passwd chmod 444 /etc/passwd chmod 000 /etc/passwd.old fi ---------------------CUT HERE-------------------------------------------------- Enjoy, -Jo ------------------------------------------------------------------------------- | Joseph E Poplawski (Jo) US Mail: 1621 Jackson Street | | Cinnaminson NJ 08077 | | UUCP:..!rutgers!rochester!moscom!telesci!fantasci!jep | | ..!princeton!telesci!fantasci!jep | | ..!pyrnj!telesci!fantasci!jep Phone: +1 609 786-8099 home | -------------------------------------------------------------------------------