ubuntu加入Windows的AD域
Integrate Ubuntu 16.04 to AD as a Domain Member with Samba and Winbind – Part 8
Step 1: Initial Configurations to Join Ubuntu to Samba4 AD
1.首先要修改好自己电脑的hostname,可以使用hostnamectl命令或者直接编辑/etc/hostname 文件
# hostnamectl set-hostname your_machine_short_name
$ cat /etc/hostname
mamh-PC
$ hostnamectl
Static hostname: mamh-PC
Icon name: computer-desktop
Chassis: desktop
Machine ID: 4165ee77f3a840b880478065c5624a98
Boot ID: 0b179497ee0a4ffdb5d5a1a288693fa9
Operating System: Ubuntu 16.04.6 LTS
Kernel: Linux 4.18.0-15-generic
Architecture: x86-64
2.然后一个重要的步骤是设置好ip。尤其是DNS 。
3.最后是重启网络,或者重启电脑。
systemctl restart networking.service
ping -c2 your_domain_name
4.最后一个步骤是安装时间同步服务器ntpdate
$ sudo apt-get install ntpdate
$ sudo ntpdate -q your_domain_name
$ sudo ntpdate your_domain_name
5.安装所需要的软件包
$ sudo apt-get install samba krb5-config krb5-user winbind libpam-winbind libnss-winbind
安装Kerberos软件时候会提示让你输入default realm,这里输入company.com,全部大写。
6.测试 Kerberos authentication
# kinit ad_admin_user
# klist
Step 2: Join Ubuntu to Samba4 AD DC
7.The first step in integrating the Ubuntu machine into the Samba4 Active Directory domain is to edit Samba configuration file.
# mv /etc/samba/smb.conf /etc/samba/smb.conf.initial
# nano /etc/samba/smb.conf
[global]
workgroup = TECMINT