Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2001 14:11:22 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        "Gerald T. Freymann" <freymann@eagle.ca>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: UID's
Message-ID:  <Pine.BSF.4.21.0108201406510.80334-100000@ren.sasknow.com>
In-Reply-To: <007701c129a0$49e9a680$0f01a8c0@phantom>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <ryan@sasknow.com>
  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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0108201406510.80334-100000>