Articles in this section

Some operations fail in Plesk: useradd: Invalid configuration: UID_MIN (10000), UID_MAX (9998)

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

The following error message is shown in Plesk:

PLESK_ERROR: useradd: Invalid configuration: UID_MIN (10000), UID_MAX (9998)
useradd: can't create user

when:

  • restoring a domain from a Plesk backup
  • adding a new domain
  • migrating a subscription
  • changing hosting type of a domain from No web hosting to Website at Domains > example.com > Hosting & DNS > Hosting.

Cause

Custom UID and GID values are defined in /etc/login.defs:

CONFIG_TEXT: # Min/max values for automatic uid selection in useradd
#
UID_MIN 1000
UID_MAX 9998
...
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 1000
GID_MAX 9998

The values in /etc/login.defs are set to create users with UID above 10000, while the MAX UID value has been set to 9998.

Resolution

  1. Connect to your Plesk server via SSH.
  2. Open the file /etc/login.defs in a text editor. In this example, we are using vi editor:

    # vi /etc/login.defs

  3. Set UID_MIN, UID_MAX , GID_MIN and GID_MAX values on the system level as follows:

    CONFIG_TEXT: UID_MIN 1000
    UID_MAX 60000
    GID_MIN 1000
    GID_MAX 60000

  4. Save the changes and close the file.
Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.