Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!brazeau.ucs.ualberta.ca!unixg.ubc.ca!ubc-cs!van-bc!zaphod.mps.ohio-state.edu!samsung!uunet!seismo!ukma!psuvax1!psuvax1!okunewck From: okunewck@psuvax1.cs.psu.edu (Phil OKunewick) Newsgroups: alt.hackers Subject: Re: hmm Message-ID: Date: 28 Jun 91 18:47:38 GMT References: <1991Jun28.143407.20485@ohm.york.ac.uk> Sender: news@cs.psu.edu (Usenet) Organization: Random, at best Lines: 32 Approved: ude.sregtur.sregtur@swen Nntp-Posting-Host: psuvax1.cs.psu.edu pete@ohm.york.ac.uk (-Pete French.) writes: >bbs.dixie@spies.com (Dixie Flatline) says: >> >> Approved: news@rutgers.rutgers.edu Why doesn't this surprise me? >> How would one add a line to crontabs to add a user with root privs to the >> /etc/passwd file IF there was not one by that name already exsisting? >> I mean I know how to get it to add the line to etc/passwd, but how would >> you get that IF clause in there? Why would you want to? If something goes wrong you will trash your password file, preventing anybody from logging on while screwing the people currently logged on. Since it's to be executed by cron, it will likely happen when you are not available to fix it (assuming you are the sysadmin for your site). (If you are not the sysadmin for the site, what the heck are you doing messing with /etc/passwd anyway?) >..."if"..."egrep"... ...not to mention at least a dozen different other ways to get the job done. Actually, this is more of a question than a hack. Requests like this really belong in comp.unix or comp.unix.wizards, not alt.hackers. You might also try sending email to cert@cert.sei.cmu.edu and see if she has any suggestions for what you want to do. (She's very familiar with this sort of thing.) ObHack: My Ob landed in the woods, to the far left of the fairway.