Hello,
I have in my smb.conf, the follow line is:
add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody %u
So, with the line machines get logon in domain, but machines come to /etc/passwd.
I would like add all machines in LDAP, how I can to do it ?

Figure out how to use ldapadd(1) to write the desired entry into
ldap://10.65.8.250, make a script, and change "add machine script" to be
/usr/local/sbin/your.ldapadd.script instead?

Unless you have a specific question about how to use
ldapadd/ldapmodify/etc. you're probably better off checking with Samba
manuals/mailing lists to see exactly what the "add machine script" needs
to do.