Hello,

I'm trying to programmatically call useradd to create an ldap user on opensuse 11.2.

The problem is that calling

useradd -m --service ldap  -D "cn=Administrator,dc=tkm,dc=com,dc=mx" testuser

requests the ldap admin password in a way which I find difficult to handle programmatically.

I thought that setting rootbinddn in /etc/ldap.conf and the password in /etc/ldap.secret would prevent useradd to ask the password but this is not the case.

Is it possible to accomplish this? (i.e. configure useradd/passswd to not to ask passwords in the command line?)

Regards,

  Juan Pablo