歡迎您光臨本站 註冊首頁

求助:samba用ads方式,認證有問題。

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

求助:samba用ads方式,認證有問題。

rhel5.4,用自帶的samba-3.0.33-3.14.el5,用ads方式認證,沒有問題。
後來,在同一台機子上,我下載了一個samba-3.0.33-3.14的源代碼包編譯,smb.conf用的是同一個,
其他的krb的配置都沒動。
用編譯的smbclient去登陸的時候,提示登錄失敗,
如果在linux下建立用戶(administrator),沒設密碼。
然後再用編譯的smbclient去登陸,就提示成功了。

這是為什麼啊,看了源代碼,好像這個時候還是要到本地的passwd文件中去查找用戶的。
那自帶的samba怎麼不需要呢?
配置又都是一樣的啊,奇怪奇怪。。。。

哪位高人對samba,特別是ads方式的比較懂的,不吝賜教啊。。
謝謝。
《解決方案》

呵呵,難道真沒人知道么?
《解決方案》

..................,真沒人知道阿
《解決方案》

從日誌上看:
lib/username.c:Get_Pwnam_internals(93)
  Trying _Get_Pwnam(), username as uppercase is CLP/ADMINISTRATOR
lib/username.c:Get_Pwnam_internals(102)
  Checking combinations of 0 uppercase letters in clp/administrator
lib/username.c:Get_Pwnam_internals(108)
  Get_Pwnam_internals didn't find user !
lib/username.c:Get_Pwnam_alloc(131)
  Finding user administrator
lib/username.c:Get_Pwnam_internals(75)
  Trying _Get_Pwnam(), username as lowercase is administrator
lib/username.c:Get_Pwnam_internals(93)
  Trying _Get_Pwnam(), username as uppercase is ADMINISTRATOR
lib/username.c:Get_Pwnam_internals(102)
  Checking combinations of 0 uppercase letters in administrator
lib/username.c:Get_Pwnam_internals(108)
  Get_Pwnam_internals didn't find user !
auth/auth.c:check_ntlm_password(273)
  check_ntlm_password: winbind authentication for user FAILED with error NT_STATUS_NO_SUCH_USER
auth/auth.c:check_ntlm_password(319)
  check_ntlm_password:  Authentication for user -> FAILED with error NT_STATUS_NO_SUCH_USER

說是找不到administrator用戶,
跟蹤了下源代碼,最終調用了getpwnam()這個函數去取得用戶名的。
man一下,
The  getpwnam()  function returns a pointer to a structure containing the broken-out fields of the record in the password  database (e.g., the local password file /etc/passwd, NIS, and LDAP) that matches the user name name.
這個函數是從/etc/passwd,NIS和LDAP的緩衝中取得用戶名的。
感覺和samba最有關係的就是LDAP。
就是不知道該怎麼設置了。。。。。

[火星人 ] 求助:samba用ads方式,認證有問題。已經有874次圍觀

http://coctec.com/docs/service/show-post-18337.html