net ads命令表
配置AD服务器步骤:
1. 安装rpm依赖包
yum -y install pam_krb5* krb5-libs* krb5-workstation* krb5-devel* krb5-auth samba samba-winbind* samba-client* samba-swat*
2. 修改主机名
/etc/hosts
增加
127.0.0.1 osgw.dtdream.rd.com osgw
127.0.0.1 osgw
/etc/samba/smb.conf
修改
workgroup DTDREAM
netio name osgw
realm dtdream.rd.com
idmap config DTDREAM
3. ping AD服务器域名
ping dtdream.rd.com
4. 增加DNS
/etc/resolv.conf 增加
nameserver 10.158.116.89
/etc/NetworkManager/NetworkManager.conf 增加
dns=none
5. 启动winbind服务
systemctl enable winbind
systemctl start winbind
6. 管理员用户名密码加入AD服务器
net ads join -UAdministrator%dtdream@123
7. net ads testjoin测试
8. 查看用户、用户组
wbinfo -u
wbinfo -g
9. 查看所有用户