Created
January 15, 2013 19:55
-
-
Save uranio-235/4541465 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# el rpoceso es simple, cada linea es una maquina | |
# Entra en la capera compartida y ala las facturas | |
# la mauqina debe tener la carpeta debidamente compartida | |
# cuyo recurso debe llamarse "factura" | |
# en algunso casos se usa cat /root/pass.txt com parametro, | |
# dicho fichero contiene el password del Domain Controller | |
# posisiionate en la carpeta compartida | |
cd /var/spool/share/facturas/ | |
# rgistro | |
smbclient -N -c "prompt;mget *" //192.168.1.42/Registro/ 2> /var/log/facturas.log > /var/log/facturas.log || cat /var/log/facturas.log | |
# yaimi | |
cd /opt/facturas/yaimi/ | |
smbclient -N //192.168.1.35/facturas/ -c "recurse;prompt;mget *" 2> /var/log/facturas.log > /var/log/facturas.log || cat /var/log/facturas.log | |
# jeni | |
cd /opt/facturas/yeni | |
smbclient -N //192.168.1.41/facturas/ -c "recurse;prompt;mget *" 2> /var/log/facturas.log > /var/log/facturas.log || cat /var/log/facturas.log | |
# laydeni | |
cd /opt/facturas/laydeni | |
smbclient -N //192.168.1.40/Factura/ -c "recurse;prompt;mget *" 2> /var/log/facturas.log > /var/log/facturas.log || cat /var/log/facturas.log | |
# liuva | |
cd /opt/facturas/liuva/ | |
smbclient -U zeus -c "recurse;prompt;mget *" //192.168.1.25/facturas/ `cat /root/pass.txt` 2> /var/log/facturas.log > /var/log/facturas.log || cat /var/log/facturas.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment