使用 Samba4 客户端和 Samba3 服务器进行 SSO,无需 Active Directory

使用 Samba4 客户端和 Samba3 服务器进行 SSO,无需 Active Directory

我目前工作的办公室是以下设置:

  • 管理单点登录、共享和打印机帐户的 Linux 服务器。这将被称为“服务器129' 和 s不应该被修改。 (如果可能的话)
  • 几个需要更换的 Windows XP 客户端。可以登录任意客户端 PC,并且文件和设置将自动可用(单点登录)。

第一步,我想将新的客户端 PC 集成到现有网络中。这个新客户端是一个新的 Linux Mint 18.3,名为“电脑135'。我在将新客户端集成到现有网络中时遇到问题。

我没有设置机器。做这件事的人已经不存在了。我自己并不是unix方面的专家,只有很少的经验。所以我尝试包含尽可能多的相关信息。

以下是设置和已完成测试的描述。


网络

我的办公室是更大网络的一部分,但我可以设法配置 IP 和 DNS。从客户端“pc135”,我可以通过名称 server129、server129.subdomain.domain.com 和 IP 对“server129”执行 ping 操作。从 server129 我可以 ping 客户端 pc135。所以我认为网络是好的。


服务器配置

该服务器正在被积极使用,如果可能的话应保持不变。我有 sudo 权限。

一切似乎都是由桑巴共享的。对于 XP 客户端,某个不知名的人编写了两个脚本来添加用户和新客户端

新客户

useradd -s /bin/false $1\$
smbpasswd -a -m $1\$

新用户

useradd -s /bin/false $1\$
smbpasswd -a -m $1\$

所以我假设一切都是由 samba 管理的。在服务器上安装了“Samba version 3.0.24”并且 testparm 结果为

Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[netlogon]"
Processing section "[profiles]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_DOMAIN_PDC
Press enter to see a dump of your service definitions

[global]
    workgroup = MYWORKGROUP
    server string = %h server
    obey pam restrictions = Yes
    passdb backend = tdbsam
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    name resolve order = lmhosts host wins bcast
    logon drive = H:
    domain logons = Yes
    os level = 200
    preferred master = Yes
    domain master = Yes
    dns proxy = No
    wins support = Yes
    panic action = /usr/share/samba/panic-action %d
    profile acls = Yes
    hide files = /desktop.ini/Desktop.ini/

[homes]
    comment = Home Directories
    valid users = %S
    read only = No
    create mask = 0700
    directory mask = 0700
    browseable = No

[netlogon]
    comment = Network Logon Service
    path = /home/samba/netlogon
    guest ok = Yes
    share modes = No

[profiles]
    comment = Users profiles
    path = /home/samba/profiles
    create mask = 0600
    directory mask = 0700
    browseable = No

[printers]
    comment = All Printers
    path = /var/spool/samba
    create mask = 0700
    printable = Yes
    browseable = No

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers

客户端配置

全新安装后,我设法使网络正常工作。在本地,我有一个具有 sudo 权限的帐户。版本:“Samba 版本 4.3.11-Ubuntu”

我使用 samba 配置测试了相当长一段时间,但没有让新客户端加入域。我用了描述。

这是我的 samba 客户端配置,这是最有前途的版本。

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "idmap uid" option is deprecated
WARNING: The "idmap gid" option is deprecated
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
'winbind separator = +' might cause problems with group membership.

Server role: ROLE_DOMAIN_MEMBER

Press enter to see a dump of your service definitions

# Global parameters
[global]
    workgroup = MYWORKGROUP
    server string = %h server (Samba, Ubuntu)
    server role = member server
    security = DOMAIN
    map to guest = Bad User
    obey pam restrictions = Yes
    pam password change = Yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    unix password sync = Yes
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    client signing = if_required
    server signing = if_required
    os level = 0
    preferred master = No
    local master = No
    domain master = No
    dns proxy = No
    wins server = server129
    usershare allow guests = Yes
    panic action = /usr/share/samba/panic-action %d
    idmap uid = 10000-20000
    idmap gid = 10000-20000
    template homedir = /home/%U
    template shell = /bin/bash
    winbind separator = +
    winbind cache time = 10
    winbind enum users = Yes
    winbind enum groups = Yes
    winbind use default domain = Yes
    client ipc signing = if_required
    idmap config * : range = 10000-20000
    idmap config * : backend = tdb


[printers]
    comment = All Printers
    path = /var/spool/samba
    create mask = 0700
    printable = Yes
    browseable = No


[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers

起初我没有得到任何联系。谷歌搜索后我添加了

   client ipc signing = auto
   server signing = auto
   client signing = auto

现在我可以看到域名信息。

net rpc info
Enter root's password:
Domain Name: MYWORKGROUP
Domain SID: S-1-5-21-2587772309-3456421220-248070441
Sequence number: 1516110814
Num users: 59
Num domain groups: 0
Num local groups: 0

此外,我在文件管理器中看到其他客户端

但我看不到用户或加入域。

sudo net rpc user
Enter root's password: 
session setup failed: NT_STATUS_NO_LOGON_SERVERS

net rpc join
No realm has been specified! Do you really want to join an Active Directory server?
Enter root's password:
No realm has been specified! Do you really want to join an Active Directory server?
connect_to_domain_password_server: unable to open the domain client session to machine SERVER129. Flags[0x00000000] Error was : NT_STATUS_ACCESS_DENIED.
Failed to join domain: failed to verify domain membership after joining: Access denied

对应的日志

[2018/01/16 14:58:57.547800,  0] ../source3/auth/auth_domain.c:121(connect_to_domain_password_server)
  connect_to_domain_password_server: unable to open the domain client session to machine SERVER129. Error was : NT_STATUS_CANT_ACCESS_DOMAIN_INFO.
[2018/01/16 14:58:57.557704,  0] ../source3/auth/auth_domain.c:121(connect_to_domain_password_server)
  connect_to_domain_password_server: unable to open the domain client session to machine SERVER129. Error was : NT_STATUS_CANT_ACCESS_DOMAIN_INFO.
[2018/01/16 14:58:57.567853,  0] ../source3/auth/auth_domain.c:121(connect_to_domain_password_server)
  connect_to_domain_password_server: unable to open the domain client session to machine SERVER129. Error was : NT_STATUS_CANT_ACCESS_DOMAIN_INFO.
[2018/01/16 14:58:57.568229,  0] ../source3/auth/auth_domain.c:184(domain_client_validate)
  domain_client_validate: Domain password server not available.

那么我还有哪些可能性呢?大多数指南都是有关 Active Directory、kerberus 和许多其他技术/软件包的内容。第一步是指定服务器上正在运行的内容。或者更好的是没有运行。我猜它没有运行活动目录和 ldap。我如何确认这一点?

相关内容