三、服务器加域

时间:2022-02-06 02:13:13

标签:

一、搭建域主机的好处:
1,简化打点事情。
2,单个帐户登陆后,可以访谒域中所有有权访谒的资源。
3,具有强大的盘问成果。
二、域主机的构建:(windows2012 r2)
https://jingyan.baidu.com/article/acf728fd4a7f80f8e410a353.html
这里有详细的配制要领。
三、处事器加域。(我们的dns:10.0.0.8 域ip:test.com)

windows处事器加域的要领:
a:在IPV4属性那里,选Advance->DNS,
b:DNS Server添加10.0.0.8
c:Append these DNS suffixes那里添加tcminplay.local

三、服务器加域


d: System->Advanced system settings->Computere Name

三、服务器加域


e:点change。改削名字和输入域ip(接下来需要输入域主机的打点员帐号和暗码)

三、服务器加域


f:添加长途登录域账户:System->Advanced system settings->Remote->Select Users ->Add ->Advanced...->输入域打点员用户名和暗码 -->Find Now -> 找到 打点员用户 添加

三、服务器加域

linux处事器加域的要领:
a:安置必需的软件包
yum install krb5-libs krb5-devel pam_krb5 krb5-workstation krb5-auth-dialog
yum install samba-winbind samba samba-common samba-client samba-winbind-clients
b:改削三个配置文件
cat /etc/samba/smb.conf
[global]
workgroup = TEST 必需大写
security = ADS
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
password server = 10.0.0.8
map to guest = bad user
encrypt passwords =yes
realm = TEST.COM 必需大写
winbind use default domain = yes
template homedir = /home/%D/%U
template shell = /bin/bash
[homes]
comment = %S
path =http://www.mamicode.com/home/%D/%S
writeable = yes
browsable = yes
; valid users = %S
valid users = CAMPUS\%S

cat /etc/krb5.conf
includedir /etc/krb5.conf.d/
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log

[libdefaults]
default_realm = TEST.COM 必需大写
dns_lookup_kdc = true
dns_lookup_realm = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = yes
rdns = false
default_ccache_name = KEYRING:persistent:%{uid}
[realms]
TEST.COM = {
kdc = 10.0.0.81:88
admin_server = 10.0.0.8:749
default_domain = TEST.COM 必需大写
}
[domain_realm]
.test.com = TEST.COM 必需大写
test.com = TEST.COM 必需大写

cat /etc/nsswitch.conf
...
passwd: files winbind
shadow: files winbind
group: files winbind 只需要改削这里
...

c:重启samba处事,重启winbind处事。
/bin/systemctl restart samba.service
/bin/systemctl start winbind.service
d:验证 :
kinit [email protected] 告成会提示输入暗码(域主机的打点员暗码)
e:加域
net ads join -S 10.0.0.8 -U Administrator
输入暗码 无报错则加域告成

域主机搭建,windows,linux的加域