通过Winbind将Linux加入到Windows 域 ===================Winbind简介===================== Winbind 是一款 Samba 组件,在 CentOS 系统下,他被包含在了 samba-common 包中。 Winbind 在Linux上实现了微软的RPC调用、可插式验证模块和名字服务切换,通过 samba 接口与 Windows 域控获得联系,可以使 NT域用户能在Linux主机上以 Linux用户身份进行操作。通过设定 Linux 服务器的 nss 配置,我们可以让系统通过 Winbind 程序来解析用户信息。 ====================NSS简介======================= NSS 是 Sun 公司开发用于定义系统中配置文件查找顺序的工具。他的配置文件在 /etc/nsswitch.conf 。通过他我们可以定义系统在登录时通过 Winbind 来获取用户信息,而不只是本地配置文件:/etc/passwd 。 以下是可能出现在 /etc/nsswitch.conf 中的项目: aliases 邮件别名; passwd 系统用户; group 用户组; shadow 隐蔽口令; hosts 主机名和 I P地址; networks 网络名和号; protocols 网络协议; services 端口号和服务名称; ethers 以太网号; rpc 远程进程调用的名称和号 netgroup 网内组 在本文中,我们需要修改的是: passwd 系统用户; group 用户组; 您需要将这两项修改为: passwd: files winbind group: files winbind 个别参考资料将 shadow 也添加了 winbind 参数,我觉得没有必要。 files 表示将从本地文件读取用户、组信息,而 winbind 参数则表示经过 winbind 从域读取用户信息。 =================安装 Samba 配置 Winbind================= 1.通过 yum 安装 samba [root@localhost etc]# yum install samba samba-common Setting up Install Process Setting up repositories update 100% |=========================| 951 B 00:00 base 100% |=========================| 1.1 kB 00:00 addons 100% |=========================| 951 B 00:00 extras 100% |=========================| 1.1 kB 00:00 Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies –> Populating transaction se...