我正在尝试设置 hpux samba,我使用这个 smb.conf
[global]
workgroup = DOMINIO
realm = DOMINIO.COM
server string = ""
netbios name = HPUX2
security = ads
hosts allow = 192.168.0.0/24 127.0.0.1
debug level = 10
log file = /var/opt/samba4/log/%m.log
max log size = 50
log level = 1
syslog = 0
template shell = /usr/local/bin/bash
template homedir = /home/%U
winbind separator = /
winbind enum users = yes
winbind enum groups = yes
winbind use default domain = yes
encrypt passwords = yes
invalid users = root
local master = yes
domain master = no
preserve case = yes
short preserve case = no
default case = lower
case sensitive = no
map to guest = never
restrict anonymous = 2
hide dot files = yes
guest account = smbnull
[Pubblica]
comment = Dir pubblica
browseable = yes
guest ok = yes
guest only = no
public = yes
path = /var/pubblica
writable = yes
当我尝试加入 AD(samba4) 时,它会在 AD 的计算机上创建 hpux 计算机,但失败并出现此错误
Failed to join domain: failed to connect to AD: Cannot contact any KDC for requested realm
Kinit 工作正常,krb5.conf 正常我还看到 spn 条目已创建,但 wbinfo -g 和 wbinfo -u 报告失败在服务器日志上我看到
receive_smb_raw_talloc failed for client ipv4:192.168.0.16:51845 read error = NT_STATUS_END_OF_FILE.
我尝试了我编译的samba4和hpux的cifs-server
如需帮助,这是 krb5.conf
[libdefaults]
default_realm = DOMINIO.COM
dns_lookup_realm = true
dns_lookup_kdc = true
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
allow_weak_crypto = true
[realms]
DOMINIO.COM = {
}
[domain_realm]
.dominio.com = DOMINIO.COM
dominio.com = DOMINIO.COM
答案1
找到解决方案。让 hpux 11.31 加入广告 samba4 的唯一方法是 a) 重新编译 krb5 mit(可以,从 Makefile 中删除迂腐和错误) b) 使用此配置安装 krb5 mit 后重新编译 samba3
./configure --prefix=/opt/samba3 --with-lockdir=/var/opt/samba3/locks --with-privatedir=/var/opt/samba3/private --sysconfdir=/etc/opt/samba3 --localstatedir=/var/opt/samba3 --with-krb5=/opt/krb5 CPPFLAGS='-I/opt/krb5/include' LDFLAGS=' -L/opt/krb5/lib -Wl,+b,/opt/krb5/lib -lkrb5 -lk5crypto -lcom_err'
c)像这样使用smb.conf,不要忘记之前创建一个smbnull用户
[global]
workgroup = DOMINIO
realm = DOMINIO.COM
server string = ""
netbios name = HPUX2
security = ads
hosts allow = 192.168.0.0/24 127.0.0.1
debug level = 10
log file = /var/opt/samba4/log/%m.log
max log size = 50
log level = 1
syslog = 0
template shell = /usr/local/bin/bash
template homedir = /home/%U
winbind separator = /
winbind enum users = yes
winbind enum groups = yes
winbind use default domain = yes
encrypt passwords = yes
invalid users = root
local master = yes
domain master = no
preserve case = yes
short preserve case = no
default case = lower
case sensitive = no
map to guest = never
restrict anonymous = 2
hide dot files = yes
guest account = smbnull
d)然后修复一些库错误编辑 /etc/SHLIB_PATH 或导出 SHLIB_PATH 并运行守护进程 smbd、nmbd、winbindd 像往常一样使用 net ads 加入 AD 使用 wbinfo 进行测试
答案2
我在 hpux 11.23 上尝试过 samba hp(称为 hp cifs 服务器),并且在 samba4 服务器上也能正常工作。问题是新的 hp cifs 服务器唯一在 11.31 上使用 samba4 工作的服务器是 03.02.00 最新版本不起作用编辑:最新版本 03.02.04 与最新的 samba 4.2 一起工作正常