Ahora, añadimos nuestro servidor linux al active directory:
net ads join -S miserver_ad.midominio.local -U administrador
Nos pedirá el password y si todo ha ido bien, nos responderá:
Using short domain name -- MIDOMINIO
Joined 'tuxServer' to realm 'MIDOMINIO.LOCAL'
Si ha funcionado bien, vamos a modificar el script que inicia el windbind…. hacemos copia y lo dejamos tal que: /init.d/windbin
#!/bin/sh
### BEGIN INIT INFO
# Provides:
winbind
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 016
# Short-Description: start Winbind daemon
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
[ -r /etc/default/winbind ] && . /etc/default/winbind
DAEMON=/usr/sbin/winbindd
# clear conflicting settings from the environment
unset TMPDIR
# See if the daemon is there
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting the Winbind daemon" "winbind"
mkdir -p /var/run/samba/winbindd_privileged || return 1
chgrp proxy /var/run/samba/winbindd_privileged/ || return 1
chmod 0750 /var/run/samba/winbindd_privileged/ || return 1
start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- $WINBINDD_OPTS
chmod 77 /var/run/samba/winbindd_privileged
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping the Winbind daemon" "winbind"
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
log_end_msg $?
;;
restart|force-reload)
$0 stop && sleep 2 && $0 start
;;
*)
echo "Usage: /etc/init.d/winbind {start|stop|restart|force-reload}"
exit 1
;;
esac
Ahora, toca modificar el orden de arranque de los servicios, siendo por orden:
1º) Samba
2º) WindBind
3º) Squid
Lógicamente, para que squid consulte correctamente el AD, tiene que tener arrancados antes que él, el samba y el WindBind..
Editamos el fichero /etc/rc.local y añadimos:
invoke-rc.d samba stop
invoke-rc.d winbind stop
invoke-rc.d squid stop
invoke-rc.d samba start
invoke-rc.d winbind start
invoke-rc.d squid start
Y reiniciamos el servidor….
# reboot
Una vez iniciado el servidor, para comprobar que todo ha ido bien, tecleamos:
# wbinfo -u
nos deberá de mostrar todos los usuarios de active directory…..
Y ahora nos toca configurar squid para que consulte los usuarios…
Hi there, i read your blog occasionally and i own a similar one and i was just curious if you get a lot of spam feedback? If so how do you stop it, any plugin or anything you can advise? I get so much lately it’s driving me insane so any assistance is very much appreciated.
Akismet is for you
Excelente post! me sirvió muchÃsimo.
Gracias!!!
Gracias !!!!!!!!