From owner-freebsd-questions Thu Mar 14 18: 7:17 2002 Delivered-To: freebsd-questions@freebsd.org Received: from roc-66-66-72-6.rochester.rr.com (roc-66-66-72-6.rochester.rr.com [66.66.72.6]) by hub.freebsd.org (Postfix) with ESMTP id BC36B37B400 for ; Thu, 14 Mar 2002 18:07:13 -0800 (PST) Received: by roc-66-66-72-6.rochester.rr.com (Postfix, from userid 1000) id 9DD25901A00; Thu, 14 Mar 2002 21:06:06 -0500 (EST) Date: Thu, 14 Mar 2002 21:06:06 -0500 From: mpd To: "E. J. Cerejo" Cc: questions@freebsd.org Subject: Re: Renaming a User? Message-ID: <20020314210606.A57913@rochester.rr.com> References: <20020315015258.D667C3C2AF@server10.safepages.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020315015258.D667C3C2AF@server10.safepages.com>; from ejcerejo@yahoo.com on Thu, Mar 14, 2002 at 08:53:20PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Mar 14, 2002 at 08:53:20PM -0500, E. J. Cerejo wrote: > I need to rename a user and his home directory, I've been looking at the pw > command but I'm a little confused about it, does anybody know how to do it? I > want it also to update everything that needs to be updated like the /etc/group > file and passwords etc! Thanks > There's no easy way to do this. vipw would be where you start, however. Whatever else is necessary depends on what's been hardcoded to use that username/directory. (Assuming you want to keep the same UID for the user.) If you just need to rename the user (and the directory doesn't matter,) you could create a second user with the desired new username, and old home directory. I suppose you could just make a link from a new directory to the old one to change the name of it. This isn't terrible difficult to do, just be careful. mike -- ___________________________________________________________ "POKEY LET'S VISIT THE POPCORN FACTORY!!!!!" - Little Girl from "POKEY AND THE BOXING GLOVE" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message