The 'useradd -r' command (-r meaning 'system user') allocates UID values top-down within the range reserved in login.defs. In contrast, adduser allocates UID values bottom-up. Whilst most user creation on a Debian system happens by way of adduser, tools which aim to have cross-distribution compatibility (e.g. Puppet) will use useradd. It would be useful if useradd would observe similar allocation policies to adduser, so that users do not end up placed at opposite ends of the allocated range depending on the method of creation. For that reason I would suggest that useradd should be patched to match the allocation policy of adduser in this respect. Max.
Quoting Max Bowsher (_@maxb.eu): I'm not sure this is a good idea to have sueradd in Debian deviate from the behaviour it has in other distros that use shadow. In short, any Debian-specific change should not be included in Deibna's shadow package. This is indeed the raison d'être of adduser...:-)
tags 690963 wontfix thanks Hello, This top-down policy was requested some years ago in order to get more freedom in the future for the users / groups defined by distributions. Currently, base-passwd reserves IDs 0-100, but this is serious restriction that will have to be handled in the future. When user management tools use the range 100-1000 bottom up, it is not possible to extend this 0-100 range reserved by distributions. So I do not think this should be changed.