快速业务通道

How to add Linux Samba to AD

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-05-15
Set up samba on linux server Linux must be configured in order to belong to a Windows domain. This is done by using the Samba file server which offers several interesting tools. The goal is not to create a Samba file server but only to use some tools which come with this server. Samba server contains among others the following components:
  • Winbind, a daemon which permits connectivity to Windows -NT environment.
  • Ntlm_auth, a tool which uses winbind for evaluating NTLM (NT Lan Manager) requests. This tool allows verifying user credentials on the domain controller and returns either a success or an error message.
Please have a look at your Linux box and check if Samba is already installed. [root@siptest ]# rpm -q samba
samba-3.0.28-0.el5.8 To ensure samba could support LDAP,KRB,ADS and WINBIND, run following commands to check samba build options ~#smbd -b | grep LDAP
~#smbd -b | grep KRB
~#smbd -b | grep ADS
~#smbd -b | grep WINBIND pleaes make sure the time is identical to the DC''s (the maximum offset time is 5 mins) ~#ntpdate 172.18.8.10
Key config. files for samba [smb.conf] [root@siptest ~]# cat /etc/samba/smb.conf |sed ''/ *#/d; / *;/d; /^ *$/d''
[global]
workgroup = 800BEST
password server = 172.18.8.10
realm = 800BEST.NET
security = ads
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /bin/false
winbind use default domain = true
winbind offline logon = false
server string = Samba Server Version %v
passdb backend = tdbsam
load printers = yes
cups options = raw
[homes]
comment = Home Directories
browseable = no
writable = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes [krb5.conf] (Watch out for case sensitivity) //注意大小写 [root@siptest ~]# cat /etc/krb5.conf |sed ''/ *#/d; /^ *$/d''
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = 800BEST
dns_lookup_realm = false
dns_lookup_kdc = true
ticket_lifetime = 24h
forwardable = yes
[realms]
800BEST.NET = {
kdc = 172.18.8.10:88
admin_server = 172.18.8.10:749
default_domain = 800BEST.NET
}
800BEST = {
kdc = 172.18.8.10
}
[domain_realm]
.800best.net = 800BEST.NET
800best.net = 800BEST.NET
[kdc]
profile = /var/kerberos/krb5kdc/kdc.conf
[appdefaults]
pam = {
debug = false
ticket_lifetime = 36000
renew_lifetime = 36000
forwardable = true
krb4_convert = false
} [nsswitch.conf ] [root@siptest ~]# cat /etc/nsswitch.conf |sed ''/ *#/d; /^ *$/d''
passwd: files winbind
shadow: files winbind
group: files winbind
hosts: files dns
bootparams: nisplus [NOTFOUND=return] files
ethers: files
netmasks: files
networks: files
protocols: files winbind
rpc: files
services: files winbind
netgroup: files winbind
publickey: nisplus
automount: files winbind
aliases:

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号