Public bug reported:

Binary package hint: passwd

In a machine with nsswitch configured to used a LDAP server with around
50000 users, trying to add a new local user (with useradd) takes a
really long time.

My /etc/nsswitch.conf contains this:
passwd:         files ldap
group:          files
shadow:         files
hosts:          files dns mdns
#hosts:          dns [!UNAVAIL=return] files mdns  #UA2006 ?
networks:       files
protocols:      db files
services:       db files
ethers:         db files
rpc:            db files
netgroup:       nis

An strace shows that useradd is fetching a full list of users from the
server: on my system his takes a long time.  Commenting out the "ldap"
in nsswitch immediately solves the problem.

Maybe this is a feature but I can't see why adding a new user should
need to verifiy every existing user.

Using the command  newusers, there is no problem even with LDAP
activated.

João Rodrigues

** Affects: shadow (Ubuntu)
     Importance: Undecided
         Status: Unconfirmed

-- 
useradd too slow with LDAP nsswitch
https://bugs.launchpad.net/bugs/120015
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to