1

I am currently managing a Postfix mail server on an Ubuntu system and I am encountering issues with UID and GID assignments for newly created users. Here are the details:

System Configuration OS: Ubuntu 22.04, Mail Server: Postfix, User Management: Using useradd command

Issue Description: When I create new users using the useradd -m testuser command, I receive the following error: useradd: Can't get unique subordinate UID range useradd: can't create subordinate user IDs

In the /etc/subuid and /etc/subgid files, there are 62,072 user entries. If I remove any user ID from these files, I can create a new user, and the removed user UID and GID ID's is assigned to the new user profile.

I have edited the /etc/login.defs file to set the UID and GID ranges as follows:

Before 
SUB_UID_MIN     100000
SUB_UID_MAX     600100000
SUB_UID_COUNT   65536
SUB_GID_MIN     100000
SUB_GID_MAX     600100000
SUB_GID_COUNT   65536

After SUB_UID_MIN 100000 SUB_UID_MAX 600100000 SUB_UID_COUNT 100000 SUB_GID_MIN 100000 SUB_GID_MAX 600100000 SUB_GID_COUNT 100000

then also the same issue occurred.

1)Why does the error occur when trying to create a new user? 2)How should I handle the large number of user entries in the /etc/subuid and /etc/subgid files to ensure new users can be created without conflicts? 3)should I change anything in the login.defs config file

0 Answers0