manual install (compile) on linux debian 12
manual install (compile) on linux debian 12
Responsável: [email protected]
Data de validação: 13/05/2024
3. Renomear o servidor
hostnamectl set-hostname dc1.citrait.corp
#!/bin/sh
#
# Start/stops the Samba daemon (samba).
# Adapted from the Samba 3 packages.
#
PATH=/usr/local/samba/sbin:/usr/local/samba/bin:$PATH
PIDDIR=/usr/local/samba/var/run
SAMBAPID=$PIDDIR/samba.pid
. /lib/lsb/init-functions
case "$1" in
start)
SERVER_ROLE=`samba-tool testparm --parameter-name="server role"
2>/dev/null | tail -1`
if [ "$SERVER_ROLE" != "active directory domain controller" ]; then
exit 0
fi
# CVE-2013-4475
KEYFILE=/usr/local/samba/private/tls/key.pem
if [ -e $KEYFILE ]; then
KEYPERMS=`stat -c %a $KEYFILE`
if [ "$KEYPERMS" != "600" ]; then
echo "wrong permission on $KEYFILE, must be 600"
echo "samba will not start (CVE-2013-4475)"
echo "Removing all tls .pem files will cause an auto-
regeneration with the correct permissions."
exit 1
fi
fi
log_end_msg 0
;;
stop)
log_daemon_msg "Stopping Samba AD DC daemon" "samba"
log_end_msg 0
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
status)
status_of_proc -p $SAMBAPID /usr/local/samba/sbin/samba samba
exit $?
;;
*)
echo "Usage: /etc/init.d/samba-ad-dc {start|stop|restart|force-
reload|status}"
exit 1
;;
esac
exit 0
# 26. linkar a biblioteca do winbind para compatibilidade com o name switches (nss)
ln -s /usr/local/samba/lib/libnss_winbind.so.2 /lib/libnss_winbind.so.2
## REFERENCIAS
https://wiki.samba.org/index.php/Main_Page
https://wiki.samba.org/index.php/Join_a_domain_as_a_DC
https://wiki.samba.org/index.php/
Setting_up_Samba_as_an_Active_Directory_Domain_Controller
https://wiki.samba.org/index.php/Configuring_Winbindd_on_a_Samba_AD_DC
https://wiki.samba.org/index.php/
Setting_up_Samba_as_a_Domain_Member#Testing_the_Winbindd_Connectivity
https://wiki.samba.org/index.php/Authenticating_Domain_Users_Using_PAM
https://wiki.samba.org/index.php/Setting_up_a_Share_Using_Windows_ACLs
https://wiki.samba.org/index.php/Setting_up_a_Share_Using_POSIX_ACLs
https://wiki.samba.org/index.php/
Verifying_the_Directory_Replication_Statuses#Displaying_the_Replication_Statuses_on
_a_Samba_DC
https://wiki.samba.org/index.php/Time_Synchronisation
# habilitar o rsync
systemctl enable rsync
systemctl start rsync