Step 8: Add an LDAP user to the system Problem [Stuck]

Discussion in 'HOWTO-Related Questions' started by oalkatib, Jan 11, 2008.

  1. oalkatib

    oalkatib New Member

    Hi Guys,
    I got to this step, and now I'm really stuck, what did I miss, or what did I do wrong, please help me, I'm a linux n00b, and I'm very thankful that I found an LDAP solution, just need some help :D
    here is what I'm inputing, and the error I'm getting

    :~# smbldap-useradd -a -m -M test -c "TEST MAN" test
    Error looking for next uid at /usr/share/perl5/ line 1044.
  2. falko

    falko Super Moderator ISPConfig Developer

  3. oalkatib

    oalkatib New Member

    Super n00b at this

    I read it, but I dont kow how to fix it, I'm a huge n00b, can you plez give some more guidence :confused:

  4. o.meyer

    o.meyer ISPConfig Developer ISPConfig Developer


    please give me some information about your smbldap-tools configuration.

    cat /etc/smbldap-tools/smbldap_bind.conf


    cat /etc/smbldap-tools/smbldap.conf

    Be sure that you put the samba.schema in the right place and configured the slapd.conf & smb.conf properly.

    Best regards,

    Last edited: Jan 12, 2008
  5. oalkatib

    oalkatib New Member

  6. o.meyer

    o.meyer ISPConfig Developer ISPConfig Developer

    Please paste the output of

    cat /etc/smbldap-tools/smbldap.conf

    here. I think there's an error in your configuration or it's not complete.

    Best regards,

  7. oalkatib

    oalkatib New Member

    config file

    Hi, this is what I have for the config file:

  8. o.meyer

    o.meyer ISPConfig Developer ISPConfig Developer

    Hi oalkatib,

    I found some errors in your configuration.

    Please use the following configuration. Replace %your_sid% with the SID from your system (getlocalsid) and %samba_netbios_name% with the netbios name that you configured in samba configuration file (/etc/samba/smb.conf):

    userGecos="System User"
    Last edited: Jan 15, 2008
  9. oalkatib

    oalkatib New Member

    Ok so, just completly replace the cfg file, with the one you pased, awsome. THANK YOU!!, I'm going to try it once I get back home :)
  10. agarcia71

    agarcia71 New Member

    Step 13: Add a workstation account to LDAP

    Hi Fellows:

    I follow every step from this howto: OpenLDAP + Samba Domain Controller On Ubuntu 7.10

    My work stations is configured just like said the howto, its have the ldap-server IP for DNS.

    But when i try to connect a workstation to the server, its doesn't work :(


    I got this message:

    DNS query refused:
    And domain server can't found it.

    Any Help !!!

    thanks in advance
  11. oalkatib

    oalkatib New Member

    netbios name

    I cant seem to find the netbios name in the samba.cfg file, here is what I have in the file:

  12. o.meyer

    o.meyer ISPConfig Developer ISPConfig Developer


    add the following line to the section [global]:

    netbiosname = PDC-SRV-EXAMPLE
    Btw, most parts of your smb.conf are misconfigured - please follow the steps in the howto exact. I haven't tested the howto - so I hope the author did a good job :) The best solution would be to to start at the scratch on a fresh system.

    Best regards,

    Last edited: Jan 16, 2008
  13. oalkatib

    oalkatib New Member

    yes, thats what I have done is followed the guid, and did start from scratch, the guide doesnt give you the complet cfg files, it only tells you to change some lines in the file
  14. oalkatib

    oalkatib New Member


    alright, this is how the smbldap .conf file looks like now:

  15. oalkatib

    oalkatib New Member

    still same error

    I'm still getting the same error when inputing this information :

  16. o.meyer

    o.meyer ISPConfig Developer ISPConfig Developer

    There are again errors in your smbldap.conf - have a look at "userSmbHome" and "userProfile". Re-populate your LDAP directory with the new configuration before you try to add a user - otherwise it won't work.

    Because the usage of the smbldap-tools goes hand in hand with the samba schema and the LDAP server configuration there can be additionally errors - please paste the output of the following commands:

    ls /etc/ldap/schema/
    cat /etc/ldap/slapd.conf | grep ^include
    cat /etc/ldap/slapd.conf | grep ^root
    cat /etc/ldap/slapd.conf | grep ^index
    cat /etc/ldap/slapd.conf | grep ^access
    Best regards,

    Last edited: Jan 16, 2008
  17. nyasaland

    nyasaland New Member

    i had the exact problem

    sudo smbldap-populate -u 30000 -g 30000
    produces some out put with alternating "adding..." then "failed to add..." and
    ending with:
    "Please provide a password for the domain root:
    /usr/sbin/smbldap-passwd: user root doesn't exist"

    "ls /etc/ldap/schema" produces:
    corba.schema cosine.schema java.schema openldap.ldif README
    core.ldif dyngroup.schema misc.schema openldap.schema samba.schema
    core.schema inetorgperson.schema nis.schema ppolicy.schema

    "sudo cat /etc/ldap/slapd.conf | grep ^include" produces:
    include /etc/ldap/schema/core.schema
    include /etc/ldap/schema/cosine.schema
    include /etc/ldap/schema/nis.schema
    include /etc/ldap/schema/inetorgperson.schema
    include /etc/ldap/schema/samba.schema
    include /etc/ldap/schema/misc.schema

    "sudo cat /etc/ldap/slapd.conf | grep ^root" produces:
    no result/nothing

    "sudo cat /etc/ldap/slapd.conf | grep ^index" produces:
    index objectClass eq

    "sudo cat /etc/ldap/slapd.conf | grep ^access" produces:
    access to atts=userPassword,sambaNTPassword,sambaLMPassword,shadowLastChane
    access to dn.base="" by * read
    access to *
  18. o.meyer

    o.meyer ISPConfig Developer ISPConfig Developer

    Hi nyasaland,

    please use the configuration for the smbldap-tools (smbldap.conf) that I posted further up.

    After that open the slapd.conf - search for this line, comment it out and edit it that it fits to your domain:

    # rootdn          "cn=admin,dc=example,dc=com"
    Insert the following line straight below (you have to insert your encrypted LDAP admin password - inclusive the leading {SSH2}):

    rootpw          %encrypted_ldap_admin_password%
    Note: slappasswd -s %ldap_admin_password% will return the password in encrypted form (SSH2).

    Now search the following line:

    # Indexing options for database #1
    Remove the line straight below ...

    index		objectClass eq
    ... and insert the following lines:

    index      objectClass,uidNumber,gidNumber                  eq
    index      cn,sn,uid,displayName                            pres,sub,eq
    index      memberUid,mail,givenname                 	    eq,subinitial
    index      sambaSID,sambaPrimaryGroupSID,sambaDomainName    eq
    index 	   zoneName,relativeDomainName 			    eq 
    index 	   dhcpHWAddress,dhcpClassData 			    eq
    Now search the line that begins with "access to attrs" - in your case:

    access to atts=userPassword,sambaNTPassword,sambaLMPassword, shadowLastChane
    Replace the line with:

    access to attrs=userPassword,sambaLMPassword,sambaNTPassword
    Now restart the LDAP server...

    /etc/init.d/slapd restart

    ... and populate your LDAP directory.

    smbldap-populate -m512 -a administrator

    Note: This will also create an account for the domain-administrator with the username "administrator".

    Best regards,

  19. oalkatib

    oalkatib New Member

    Thanks alot for the quick responses Olli, I got swamped with other projects, and skool, and I wasnt able to resume work on LDAP until now, i'm still stuck at the same point, please guide, I tried to provide the output for each othe commands you provided
  20. o.meyer

    o.meyer ISPConfig Developer ISPConfig Developer

Share This Page