From owner-freebsd-questions Thu Jun 4 21:28:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA24305 for freebsd-questions-outgoing; Thu, 4 Jun 1998 21:28:25 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from ironbark.bendigo.latrobe.edu.au (root@ironbark.bendigo.latrobe.edu.au [149.144.21.60]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA24161 for ; Thu, 4 Jun 1998 21:27:39 -0700 (PDT) (envelope-from boc@ironbark.bendigo.latrobe.edu.au) Received: (from boc@localhost) by ironbark.bendigo.latrobe.edu.au (8.8.8/8.8.8) id OAA05884 for freebsd-questions@FreeBSD.ORG; Fri, 5 Jun 1998 14:27:25 +1000 (EST) From: "Brian O'Connor" Message-Id: <199806050427.OAA05884@ironbark.bendigo.latrobe.edu.au> Subject: what happens to daemon processes when password file is zeroed To: freebsd-questions@FreeBSD.ORG Date: Fri, 5 Jun 1998 14:27:25 +1000 (EST) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, I have an aversion to NIS, and am trying to roll my own with ssh and other such tools. I have already had the delightfull experience of deleting the password file(I got my + < and > the wrong way around in perl). It occured to me that if the password file was deleted, or of zero length how do running daemons handle permissions? ie, processes seemed to continue to run, I just couldn't log in. What I want to try is to write a daemon that checks to see if the passwd file exists, and is of non zero size(i could put other tests here, but this will do for a start). If this test fails, it copies a fail safe copy over and then reports the error, of course this will fail if the daemon does not have permission to write to /etc (since there is no user root) I suspect I'll have to try it and see. boc -- Brian O'Connor, Unix Systems Consultant La Trobe University,Bendigo,Australia; b.oconnor@latrobe.edu.au http://ironbark.bendigo.latrobe.edu.au/~boc/resume.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message