How to avoid warning message in RHEL9 while creating user with UID outside of UID_MAX limit
Environment
- Red Hat Enterprise Linux 9
Issue
- warning message in RHEL9 when create user with UID outside of UID_MAX limit
[root@ipa1 ~]# useradd -u 100018 testing
useradd warning: testing's uid 100018 outside of the UID_MIN 1000 and UID_MAX 60000 range.
[root@ipa1 ~]# grep testing /etc/passwd
testing:x:100018:1002::/home/testing:/bin/bash
Resolution
- Open the /etc/login.defs file and make the following changes.
uID_MIN 1000
UID_MAX 200000
GID_MIN 1000
GID_MAX 200000
Note: By default value of uid is 60000 so we can adjust as per our requirement
Note: It would be fine if we can use uid under 60000 for local users.
Diagnostic Steps
- warning message if you are creating user with uid value
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments