install krb5-config krb5-user
vi /etc/krb5.conf
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
ticket_lifetime = 24000
default_realm = DALIAN.COM #改成自己的AD
dns_lookup_realm = false
dns_lookup_kdc = true #改动
[realms]
DALIAN.COM = {
kdc = 10.2.0.147:88 #改成AD ipaddress
admin_server = 10.2.0.147:749 #再改
default_domain = DALIAN.COM #还是改
}
[domain_realm]
.dalian.com = DALIAN.COM #改成自己的AD
dalian.com = DALIAN.COM #改成自己的AD
[kdc]
profile = /var/kerberos/krb5kdc/kdc.conf
[appdefaults]
pam = {
debug = false
ticket_lifetime = 36000
renew_lifetime = 36000
forwardable = true
krb4_convert = false
}
ntpdate -b 10.2.0.147 # ad服务器
kinit administrator@DALIAN.COM #注意大写
install samba
vi /etc/samba/smb.conf
[global]
workgroup = DALIAN
realm = DALIAN.COM
preferred master = no
server string = %h server
security = ADS
password server = 10.2.0.147
log level = 3
log file = /var/log/samba/%m
max log size = 50
winbind separator = +
idmap uid = 10000-20000
idmap gid = 10000-20000
install winbind
vi /etc/nsswitch.conf
passwd: files winbind
group: files winbind
net ads join -U administrator
restart samba
restart winbind
wbinfo -t
wbinfo -u
wbinfo -g
smb.conf 相关说明
要提供分享资源时,须先把欲分享的资源以 [ ] 符号括住,底下通常会带指令和参数来表示此资源的设定和存取权限等,详情如下
comment———注释说明
path————分享资源的完整路径名称,除了路径要正确外,目录的权限也要设对
browseable——是yes/否no在浏览资源中显示共享目录,若为否则必须指定共享路径才能存取
printable——-是yes/否no允许打印
hide dot ftles–是yes/否no隐藏隐藏文件
public———-是yes/否no公开共享,若为否则进行身份验证(只有当security = share 时此项才起作用)
guest ok——–是yes/否no公开共享,若为否则进行身份验证(只有当security = share 时此项才起作用)
read only——-是yes/否no以只读方式共享当与writable发生冲突时也writable为准
writable——–是yes/否no不以只读方式共享当与read only发生冲突时,无视read only
vaild users—–设定只有此名单内的用户才能访问共享资源(拒绝优先)(用户名/@组名)
invalid users—设定只有此名单内的用户不能访问共享资源(拒绝优先)(用户名/@组名)
read list——-设定此名单内的成员为只读(用户名/@组名)
write list——若设定为只读时,则只有此设定的名单内的成员才可作写入动作(用户名/@组名)
create mask—–建立文件时所给的权限
directory mask–建立目录时所给的权限
force group—–指定存取资源时须以此设定的群组使用者进入才能存取(用户名/@组名)
force user——指定存取资源时须以此设定的使用者进入才能存取(用户名/@组名)
allow hosts—–设定只有此网段/IP的用户才能访问共享资源
allwo hosts = 网段 except IP
deny hosts——设定只有此网段/IP的用户不能访问共享资源
allow hosts=本网段指定IP指定IP
deny hosts=指定IP本网段指定IP
阅读(485) | 评论(0) | 转发(0) |