SAMBA:使用者 root 不存在

SAMBA:使用者 root 不存在

我正在關注UBUNTU伺服器指南安裝與設定 SAMBA:

一切都完全按照上面提到的進行,除了當我嘗試通過 samba LDAP 物件時

smbldap-populate

我收到錯誤:

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

誰能幫我解決這個問題嗎?請簡要解釋您的解決方案。

先致謝!

編輯:我嘗試修改 /etc/smbldap-tools/smbldap_bind.conf 文件

slaveDN="cn=admin,dc=example,dc=local"
slavePw="passwd"
masterDN="cn=admin,dc=example,dc=local"
masterPw="passwd"

並向 LDAP 樹提供相同的密碼:

smbpasswd -w passwd

(passwd 與我安裝 LDAP 時提供的密碼相同)

現在我運行時出現以下錯誤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!

答案1

好的,解決了這個問題。這是 smbldap.conf 和 smbldap_bind.conf 檔案的問題。由於某種原因,其中的用戶憑證與我輸入的用戶憑證不符。

運行smbldap-config並重建上述文件可以讓您重置這些資訊。

相關內容