From owner-freebsd-questions@FreeBSD.ORG Wed Dec 12 18:04:57 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0ECC16A417 for ; Wed, 12 Dec 2007 18:04:57 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from heka.cenkes.org (heka.cenkes.org [208.79.80.110]) by mx1.freebsd.org (Postfix) with ESMTP id CBC0B13C461 for ; Wed, 12 Dec 2007 18:04:57 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from amilo.cenkes.org (ppp85-141-135-176.pppoe.mtu-net.ru [85.141.135.176]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTP id 8A872242F82C; Wed, 12 Dec 2007 21:04:56 +0300 (MSK) Date: Wed, 12 Dec 2007 21:04:54 +0300 From: Andrew Pantyukhin To: Francisco Reyes Message-ID: <20071212180452.GP51627@amilo.cenkes.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 8.0-CURRENT amd64 User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Free BSD Questions list Subject: Re: Where is the next uid from adduser pulled from? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: infofarmer@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 18:04:58 -0000 On Wed, Dec 12, 2007 at 12:00:06PM -0500, Francisco Reyes wrote: > I have scripts to add new users. However, after that any port that installs > a user creates it with a UID after the ones I made. > > For example I want all employees to have uids starting at 5000, but I would > like too port installed uids to be 2000 and up. After I add some users (ie > say last user is 5008), the next port that installs a user and doesn't > specify uid.. then will get 5009. > > Tried looking for the adduser program, but could not find adduser.c It's pw(8) that selects default uids and it just takes the last one (numerically) and uses the next one. Create a placeholder user with uid 5000 and let ports use uids 5000+, but when creating new users, specify uids manually (both pw and adduser allow that). Good luck!