how to clean occupied uid

A 5 star hangout for overworked and underpaid system admins.
Post Reply
Posts: 1
Joined: 2023/01/17 08:40:29

how to clean occupied uid

Post by charliecao » 2023/01/17 09:57:37

it prompts "UID xxx is used before, force error for security reason" when I want to add an user with certain uid xxx,(the system needs this uid),and I checked /etc/passwd , no any user uses this uid.

So, how to clear completely used uid ,so I can use that uid.

Posts: 1177
Joined: 2017/02/22 15:08:17

Re: how to clean occupied uid

Post by tunk » 2023/01/18 12:54:02

Command line or GUI?
IIRC UIDs<1000 are reserved for the system, so if
you use GUI, then it may have some built in checks.
Also check /etc/shadow.

(BTW, this isn't the correct forum section.)

User avatar
Site Admin
Posts: 32773
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: how to clean occupied uid

Post by TrevorH » 2023/01/18 12:57:35

I'd start by finding out what uses it.

getent passwd xxx (for some numeric value of xxx)
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke

Post Reply