文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>把Linux加入到Windows域全攻略

把Linux加入到Windows域全攻略

时间:2009-03-23  来源:sjhf

把Linux加入到Windows域全攻略
1、samba
首先确保你的Linux系统中安装了samba包,并用下述命令来检查samba包的基础库支持,一般的RPM安装都不会有问题。
# smbd -b | grep LDAP
HAVE_LDAP_H
HAVE_LDAP
HAVE_LDAP_DOMAIN2HOSTLIST
...
# smbd -b | grep KRB
HAVE_KRB5_H
HAVE_ADDRTYPE_IN_KRB5_ADDRESS
HAVE_KRB5
...
# smbd -b | grep ADS
WITH_ADS
WITH_ADS
# smbd -b | grep WINBIND
WITH_WINBIND
WITH_WINBIND
2、krb5配置
编辑/etc/krb5.conf中以下三节: 假设你的域名是SZ.AAA.COM,域控制器是dc01.sz.aaa.com/192.168.1.200。
[libdefaults]
 default_realm = SZ.AAA.COM
 dns_lookup_realm = false
 dns_lookup_kdc = true
[realms]
 SZ.AAA.COM= {
  kdc = 192.168.1.200:88
  admin_server = 192.168.1.200:749
  default_domain = SZ.AAA.COM
 }
[domain_realm]
  .SZ.AAA.COM= SZ.AAA.COM
  SZ.AAA.COM= SZ.AAA.COM
       
确保你的配置严格区分大小写,否则你可能在用kinit测试连接时可能遇到错误 “Cannot find KDC for requested realm while getting initial credentials”.
# kinit [email protected]
Password for [email protected]
3、Samba配置
编辑修改/etc/samba/smb.conf如下:
[global]
workgroup = SZ
realm = SZ.AAA.COM
security = ADS
password server = 192.168.1.200
encrypt passwords = yes
winbind separator = +
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind use default domain = Yes
[homes]
comment = Home Directories
valid users = %S
read only = No
browseable = No
保存并用testparm来检查配置中可能的语法错误。
若无错误,(重)启动samba服务。
然后用 net ads join -S 192.168.1.200 -U Administrator来加入域,这时需要输入域管理员密码。
4、winbind配置
编辑/etc/nsswitch.conf,更改passwd和group为(files需视你linux系统配置NIS与否,如配置NIS,则为compat)
passwd:  files winbind 
group:  files winbind 
保存后(重)启动samba服务。(重)启动winbind。
用 wbinfo -u检索用户,wbinfo -g检索用户组来测试winbind是否正常。
5、Apache中NTLM用户校验模块,用下面的链接可以得到其源代码。
相关阅读 更多 +
排行榜 更多 +
步行僵尸2无限金币版

步行僵尸2无限金币版

体育竞技 下载
狐狸一号特殊任务无限金币版

狐狸一号特殊任务无限金币版

体育竞技 下载
忍者之雷复仇无限金币钻石版

忍者之雷复仇无限金币钻石版

体育竞技 下载