Create new linux user with specific UID

For a process I would like to restrict access to, I would like to create a new linux user with a specific UID. adduser -u 1234 user errors with adduser: number 1234 is not in 0..0 range. However, when not specifying UID, a new user is created starting with a UID = 3.

Is there a way to create users with UID > 1000 ?

You can modify the UID by modifying the /etc/passwd
https://openwrt.org/docs/guide-user/additional-software/create-new-users

1 Like