freebsd_member_of_ad
pkg install samba413
mcedit /etc/hosts
127.0.0.1 localhost
mcedit /etc/resolv.conf
search domain.local nameserver 192.168.150.2 nameserver 192.168.150.109
mcedit /etc/krb5.conf
[libdefaults]
default_realm = DOMAIN.LOCAL
dns_lookup_realm = false
dns_lookup_kdc = true
mcedit /etc/nsswitch.conf
... group: files winbind ... passwd: files winbind ...
mcedit /etc/rc.conf
hostname="free-samba.domain.local" ... samba_server_enable="YES" samba_enable="YES" nmbd_enable="YES" smbd_enable="YES" winbindd_enable="YES" samba_server_config="/usr/local/etc/smb4.conf"
cp /usr/share/zoneinfo/Asia/Almaty /etc/localtime ntpdate 192.168.150.2
mcedit /usr/local/etc/smb4.conf
[global] workgroup = DOMAIN security = ADS realm = DOMAIN.LOCAL winbind refresh tickets = yes dedicated keytab file = /etc/krb5.keytab kerberos method = secrets and keytab winbind use default domain = yes load printers = no printing = bsd printcap name = /dev/null disable spoolss = yes log file = /var/log/samba4/%m.log log level = 1 idmap config * : backend = tdb idmap config * : range = 3000-7999 idmap config DOMAIN:backend = rid idmap config DOMAIN:range = 10000-999999 template shell=/bin/csh template homedir = /home/%U local master = no domain master = no preferred master = no
net ads join -U sys_admin_of_domain net ads changetrustpw /usr/local/etc/rc.d/samba_server start
net ads leave -U sys_admin_of_domain net ads join -U sys_admin_of_domain net ads changetrustpw /usr/local/etc/rc.d/samba_server restart
freebsd_member_of_ad.txt · Last modified: 2025/07/09 10:45 by admin