uid greater than...
Jorge Almeida
jalmeida
Sat Dec 30 11:40:55 PST 2006
On Sat, 30 Dec 2006, Mike Reinehr wrote:
> On Saturday 30 December 2006 07:36, Jorge Almeida wrote:
>> When creating a new user, is there some way to force the uid to be
>> greater than some value? I know I can do "useradd -u 10030 ...", for
>> example, but that's not what I mean. The man page for useradd says that
>> by default (i.e., without using the -u flag) the new user uid will be
>> the smallest value greater than 999 and greater than every other
>> existing user's uid. I want this behaviour with 10000 instead of 999
>> (for some users, not for all of them).
>> Is there some way do do it at all (short of cooking a wrapper that would
>> check the uid of existing users)?
>
> Check out the `adduser` command (rather than the `useradd` command). It has a
> configuration file (/etc/adduser.conf) which, among other options includes:
>
> # FIRST_UID to LAST_UID inclusive is the range of UIDs of dynamically
> # allocated user accounts.
> FIRST_UID=1000
> LAST_UID=29999
>
> You also have the option of using multiple configuration files.
>
Seems promising, but in my gentoo system /usr/sbin/adduser is just a
symlink to /usr/sbin/useradd! It belongs to the package shadow-4.0.18.1.
No separate man page, of course.
Can you check whether it is the same package in your system?
And what is your distro? I'll ask the gentoo list with those data.
Thanks.
--
Jorge
More information about the Linux-users
mailing list