From owner-freebsd-questions Mon Aug 20 13:11:30 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ren.sasknow.com (ren.sasknow.com [207.195.92.131]) by hub.freebsd.org (Postfix) with ESMTP id 4D4B737B40A for ; Mon, 20 Aug 2001 13:11:26 -0700 (PDT) (envelope-from ryan@sasknow.com) Received: from localhost (ryan@localhost) by ren.sasknow.com (8.9.3/8.9.3) with ESMTP id OAA81062; Mon, 20 Aug 2001 14:11:22 -0600 (CST) (envelope-from ryan@sasknow.com) Date: Mon, 20 Aug 2001 14:11:22 -0600 (CST) From: Ryan Thompson To: "Gerald T. Freymann" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: UID's In-Reply-To: <007701c129a0$49e9a680$0f01a8c0@phantom> Message-ID: Organization: SaskNow Technologies [www.sasknow.com] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Gerald T. Freymann wrote to freebsd-questions@FreeBSD.ORG: > How does FreeBSD pick the User ID number? Depends which tool you use, but usually it does a good job, unless an admin starts mucking around in /etc/master.passwd or lots of unusual changes/renumbering is done. > One of our machines has somehow managed to duplicate UID's twice... > > That is to say, UID # 1647 exists twice, and #3515 exists twice. > > How does one go about giving the duplicate users unique numbers > without upsetting the apple cart? For two users with the same UID, give one an unused UID (edit /etc/master.passwd for this), and change their GID if necessary. Rebuild the password database. Then, change the ownership of all of their files to the new UID (or just chown username:usergroup) Unless these users change files all over the system, they should basically have a home directory, mailbox, and probably some temp files. chown -R usergroup:username /home/username /var/mail/username ...usually does the trick on most systems. Be careful with chown -R--it recursively spans subdirectories. Nothing like having a whole filesystem owned by one of your users ;-) > Thanks. > > gf. > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > -- Ryan Thompson Network Administrator, Accounts SaskNow Technologies - http://www.sasknow.com #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2 Tel: 306-664-3600 Fax: 306-664-1161 Saskatoon Toll-Free: 877-727-5669 (877-SASKNOW) North America To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message