From owner-freebsd-hackers Wed Dec 3 20:14:34 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id UAA16310 for hackers-outgoing; Wed, 3 Dec 1997 20:14:34 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from word.smith.net.au (vh1.gsoft.com.au [203.38.152.122]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id UAA16301; Wed, 3 Dec 1997 20:14:28 -0800 (PST) (envelope-from mike@word.smith.net.au) Received: from word (localhost [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id OAA01448; Thu, 4 Dec 1997 14:39:29 +1030 (CST) Message-Id: <199712040409.OAA01448@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: Gopakumar H Pillai cc: FreeBSD Questions , hackers@freebsd.org Subject: Re: Passwd file updation In-reply-to: Your message of "Tue, 02 Dec 1997 14:58:35 -0800." <3484929A.F3ECC50F@global.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 04 Dec 1997 14:39:28 +1030 From: Mike Smith Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > How should I go about updating the passwd file through a program in the > safest way? I mean, when I do vipw it creates a file /tmp/pwd.xxxxx > where xxxxx is the pid of the process. What all such steps should be > taken to update the passwd file and eventually the passwd database. Use 'pw' to do this. sprintf() and system() are your friends. mike