I'm following the UBUNTU server guide to install and configure SAMBA:

Everything went exactly as mentioned, except when I try to samba LDAP objects by


I get the error:

Please provide a password for the domain root:
/usr/sbin/smbldap-passwd: user root doesn't exist

Can anyone help me to sort this out? Please explain your solution briefly.

Thanks in advance!

EDIT: I tried to modify the /etc/smbldap-tools/smbldap_bind.conf file


and gave the same password to the LDAP tree:

smbpasswd -w passwd

(passwd is the same password I gave when installing LDAP)

Now I get the following error when I run smbldap-populate

entry dc=example,dc=com already exist.
entry ou=People,dc=example,dc=com already exist.
entry ou=Group,dc=example,dc=com already exist.
entry ou=Machines,dc=example,dc=com already exist.
entry ou=Idmap,dc=example,dc=com already exist.
entry sambaDomainName=EXAMPLE.COM,dc=example,dc=com already exist. Updating it...

failed to modify entry: modifications require authentication at /usr/sbin/smbldap-populate line 493.
entry uid=root,ou=People,dc=example,dc=com already exist.
entry uid=nobody,ou=People,dc=example,dc=com already exist.
entry cn=Domain Admins,ou=Group,dc=example,dc=com already exist.
entry cn=Domain Users,ou=Group,dc=example,dc=com already exist.
entry cn=Domain Guests,ou=Group,dc=example,dc=com already exist.
entry cn=Domain Computers,ou=Group,dc=example,dc=com already exist.
entry cn=Administrators,ou=Group,dc=example,dc=com already exist.
entry cn=Account Operators,ou=Group,dc=example,dc=com already exist.
entry cn=Print Operators,ou=Group,dc=example,dc=com already exist.
entry cn=Backup Operators,ou=Group,dc=example,dc=com already exist.
entry cn=Replicators,ou=Group,dc=example,dc=com already exist.

Please provide a password for the domain root:
Changing UNIX and samba passwords for root
New password:
Retype new password:
Use of uninitialized value in exec at /usr/sbin/smbldap-passwd line 192, <STDIN> line 2.
Can't exec "": No such file or directory at /usr/sbin/smbldap-passwd line 192, <STDIN> line 2.
Use of uninitialized value $smbldap_tools::config{"slappasswd"} in string at /usr/share/perl5/smbldap_tools.pm line 1541, <STDIN> line 2.
Can't exec "": No such file or directory at /usr/share/perl5/smbldap_tools.pm line 1541, <STDIN> line 2.
readline() on closed filehandle BUF at /usr/share/perl5/smbldap_tools.pm line 1545.
Failed to generate password hash!
Failed to generate password hash!
  • did you do : sudo systemctl restart smbd.service nmbd.service ? – tatsu May 17 '17 at 11:51
  • I tried service smbd nmbd restart and tried again, but get the same error – usert22watslll May 17 '17 at 17:09

Okay, solved this. It's a problem with smbldap.conf and smbldap_bind.conf files. For some reason the user credentials in them did not match the ones I entered.

Running smbldap-config and rebuilding the above files lets you reset these information.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.