#580024 [ldapscripts] users are assigned to uid > 65534

#580024#5
Date:
2010-05-03 08:10:24 UTC
From:
To:
--- Please enter the report below this line. ---

the starting UID is defined  in /etc/ldapscripts/ldapscripts.conf

   UIDSTART="10000"

when creating a user, like

         ldapadduser wrohrm Lehrer

the user gets the uid 65535.

I tried to find the reason and found in usr/share/ldapscripts/runtime:

# Output : the last user id used + 1 (so the first useable user id) ($_UID)

_findlastuser () {
  _UID=`_ldapsearch "$SUFFIX" '(objectClass=posixAccount)' uidNumber |
grep "uidNumber: " | sed "s|uidNumber: ||" | uniq | sort -n | tail -n 1`
  if [ -z "$_UID" ] || [ ! "$_UID" -gt "$UIDSTART" ]
  then
    _UID="$UIDSTART"
  fi
  _UID=`expr "$_UID" + 1`
}

this explains what happend, because

getent passwd

shows

nobody:x:65534:65534:nobody:/nonexistent:/bin/sh

this seems a conceptional problem. Suggestion: What about using
ranges like /etc/adduser.conf does?

FIRST_UID=1000
LAST_UID=29999

probably the same problem arises with group id's.


greetings

   W. Rohrmoser


Debian Release: 5.0.4
  500 stable          x2go.obviously-nice.de
  500 stable          www.debian-multimedia.org
  500 stable          security.debian.org
  500 stable          ftp.de.debian.org
   10 testing         ftp.de.debian.org
    1 unstable        www.emdebian.org
    1 unstable        uclibc.debian.net
    1 unstable        ftp.de.debian.org
--- Package information. ---
Package's Depends field is empty.

Package's Recommends field is empty.

Package's Suggests field is empty.

#580024#10
Date:
2010-05-03 19:25:40 UTC
From:
To:
Hello, W..
Thank you for diggin' in.

Do I understand right that you have nobody user in ldap database?
That's not normal, I think, because this is not real user, but OS's
internal role. Could you describe, why do you need such configuration?
This will help me and upstream to solve your problem correctly...