[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Get machines in Base LDAP

On Wed, 9 Jan 2013, rodrigo tavares wrote:


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://, 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.

ldap admin dn = cn=admin,dc=brazil,dc=mg,dc=gov,dc=br
        ldap group suffix = ou=groups
        ldap machine suffix = ou=computers
        ldap passwd sync = yes
        ldap suffix = dc=brazil,dc=mg,dc=gov,dc=br
        ldap ssl = no
        ldap user suffix = ou=defensoria
        passdb backend = ldapsam:ldap://
        passdb backend = tdbsam
        hosts allow =,