viernes, 26 de abril de 2013

SCP copy files from Mac to Linux


scp command line to securely copy files over ssh, between Linux, Mac or Windows



Written by Guillermo Garron .
Date: 2012-04-25 16:59:35 -0400

SCP Introduction

scp stands for secure cp (copy), which means you can copy files across ssh connection. That connection will be securely encrypted, it is a very secure way to copy files between computers
You can use scp to copy files from or to a remote server. You can also copy files from one remote server to another remote server, without passing traffic through your PC.
You can use scp on Linux, Mac and Windows (using WinSCP).

SCP Usage

scp [[user@]from-host:]source-file [[user@]to-host:][destination-file]
from-host
Is the name or IP of the host where the source file is, this can be omitted if the from-host is the host where you are actually issuing the command
user
Is the user which have the right to access the file and directory, that is supposed to be copied in the case of the from-host, and the user who has the rights to write in the to-host
source-file
Is the file or files that are going to be copied to the destination host, it can be a directory but in that case you need to specify the -r option to copy the contents of the directory
destination-file
Is the name that the copied file is going to take in the to-host, if none is given all copied files are going to keep its names

SCP Options

-p
Preserves the modification and access times, as well as the permissions of the source-file in the destination-file
-q
Do not display the progress bar
-r
Recursive, so it copies the contents of the source-file (directory in this case) recursively
-v
Displays debugging messages

SCP Examples

scp *.txt user@remote.server.com:/home/user/
That is going to copy all files with .txt extension to the folder /home/user in the remote.server.com host
scp -r miguel@10.1.2.2:/home/miguel/ miguel@10.1.2.3:/home/miguel/
That is going to recursively copy all files from Miguel’s home directory on 10.1.2.2 to his home folder in 10.1.2.3 host.
As have been told before, scp copies files between computers using ssh, and there are three types of usage:
Copy files from a local computer to a remote computer
scp somefile username@server:/home/username/
Copy files from a remote server to your local computer
scp username@server:/home/username/file_name /home/local-username/file-name
Copy files from a remote server to another remote computer
This is really interesting and very useful, as the files copied from one server to the other, are not going to pass through your computer. The traffic is going to pass from one server to the other directly.
scp user_name1@server1:/home/user_name1/file_name user_name2@server2:/home/user_name2/

SCP Tricks

Bandwidth limit
You may limit the bandwidth used by scp command
scp -l limit username@server:/home/uername/* .
Where limit is specified in Kbit/s.
Increase scp speed
scp uses AES-128 to encrypt data, this is very secure, but also a litle bit slow. If you need more speed and still have security, you can use Blowfish or RC4.
To increase scp speed change chipher from the default AES-128 to Blowfish
scp -c blowfish user@server:/home/user/file .
Or use RC4 which seems to be the fastest
scp -c arcfour user@server:/home/user/file .
This last one is not very secure, and it may not be used if security is really an issue for you. You can also increase security while decreasing speed. Everything has its cost.
scp -c 3des user@server:/home/user/file .
That is maybe the slowest, but also maybe the more secure one (I may be wrong, I’m not an expert in encryption).

Final notes

It is very important to consider that scp encrypts the data before sending it over the internet. So, if you can use it over ftp or rcp, you better use it.
Finally, as I said before, you can use WinSCP to copy to and from Windows to Linux or Mac. For the Mac OS Xscp is supported by default, just like with Linux.

Source: http://www.garron.me/linux/scp-linux-mac-command-windows-copy-files-over-ssh.html

jueves, 25 de abril de 2013

Open as Administrator in Ubuntu


Open As Administrator in Ubuntu 12.04 & 12.10


This tutorial is going to show you how to add ‘Open As Administrator’ in Nautilus’ context menu in Ubuntu 12.04 & 12.10. This will allow you to edit or modify files or folders with root or administrator permission.
For Ubuntu 10.10 and 10.04, you can just install nautilus-gksu package from Ubuntu Software Center, then you get the ‘Open As Administrator’ option at next login. For Ubuntu 11.04 and 11.10, install nautilus-gksu and copy and paste libnautilus-gksu.so file from /usr/lib/nautilus/extensions-2.0/ to /usr/lib/nautilus/extensions-3.0/
Method 1: (not working for Ubuntu 12.10)
nautilus-gksu package has been dropped in Ubuntu 12.04 and 12.10 since “gksu” 2.0.2-6ubuntu1 release, so you can not install it easily. Here I’m going to use nautilus script to add Open As Administrator functionality.
First download the libnautilus-gksu.so file:
Click to Download libnautilus-gksu.so
Then, run gksudo nautilus in terminal (Ctrl+Alt+T) to open file browser with root privilege, copy and paste this file to/usr/lib/nautilus/extensions-3.0/. Or do it with this command:
sudo cp ~/Downloads/libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0/
Log out and back in, or run this command to take effect:
nautilus -q
Enjoy!

viernes, 22 de febrero de 2013

Remotely-Restart a Windows Machine Through Command-Line


The DOS command line built into every windows machine can be used to perform a lot of useful tasks including shutting down or restarting another device remotely. To remotely restart a Windows machine through command line, follow these instructions.

EditSteps

Enable Remote Restart on the Desired Windows Machine

  1. 1
    Log into the machine you’d like to remote-restart as an Administrator.

    Soluciones SharePoint

     Desarrollos a medida especificos para Intranet, Extranet, Internet
    www.huddle.com.ar
  2. 2
    Go to Start > Run.




    • Alternatively, type services.msc into the Search function and skip to Step 3.




  3. 3
    Type services.msc and hit Open.




  4. 4
    Scroll down to Remote Registry, right-click, and select Properties from the drop-down list.




  5. 5
    To the right of Startup Type, select Automatic from the drop-down list, then hit OK.




  6. 6
    Configure your firewall to make Windows Management Instrumentation (WMI) an allowed program. How you do this will depend on your firewall program.
    • To do this on Windows Firewall, go to Windows Firewall, click Change Settings, go to the Exceptions tab, and check the box next to Windows Management Instrumentation (WMI).




  7. 7
    Make a note of the device name, as you will need it later. To do this on a Windows computer:
    • Right-click on My Compter and select Properties.




    • Scroll down to Computer name, domain, and workgroup settings. You will find the computer name listed here.




Remotely Restart via Command Prompt

  1. 1
    Log into a remote Windows computer as an Administrator.
  2. 2
    Go to Start > Run.







    • Alternatively, type cmd.exe into the Search function and skip to Step 3.




  3. 3
    Type cmd.exe and hit Open.




  4. 4
    Type shutdown /i and hit Enter.




  5. 5
    Click Add, type in the name of the remote device, and hit OK.




  6. 6
    Apply the desired settings and hit OK. For example, you can choose to shut down or restart, warn the user on the remote machine, display the warning for a set length of time, etc.

Remotely Restart on Windows XP Professional

  1. 1
    Log into a remote Windows computer as an Administrator.
  2. 2
    Go to Start > Control Panel.
  3. 3
    Navigate to Performance and Maintenance > Administrative Tools > Computer Management.
  4. 4
    Right-click Computer Management (Local) and select Connect to another computer.
  5. 5
    Click Another computer, type the name of the machine you want to restart, and click OK. You can also click Browse to find this name.
  6. 6
    Right-click Computer Management (Name You Supplied) and select Properties.
  7. 7
    Under the Advanced tab, click Startup and Recovery.
  8. 8
    Click Shutdown, find Actions, and select Restart.
  9. 9
    Under Force Apps Closed, adjust to the desired settings and hit OK.

jueves, 13 de septiembre de 2012

Resetear contrase;a de Windows 7

Reference: http://foro.elhacker.net/windows/windows_7_restablecer_contrasena_de_una_cuenta_de_usuario_administrador-t352745.0.html Windows 7: Restablecer contraseña de una cuenta de usuario Administrador « en: 5 Febrero 2012, 16:59 » Con esto se podrá recuperar la contraseña de los usuarios registrados en un equipo local sin necesidad obviamente de entrar en el sistema, de manera que no se tenga que introducir la clave anterior para restablecer una nueva passw, de modo que genera una nueva contraseña para el usuario en la que seleccionemos, incluido administradores locales. Así también como el poder manipular otras configuraciones adicionales. Esto es un pequeño hack descarado y un agujero de seguridad grande. Funciona en versiones Windows XP/Vista y 7 y con arquitecturas de x86 y x64, no sé como Microsoft ha permitido... esto pero ellos sabrán. Me imagino que la razón será por si algún usuario que solo tenga una cuenta y cambia la passw de esta en un momento de su vida se olvida de ella, pueda iniciar sesión con una nueva clave y acceder al sistema con la cuenta de usuario en cuestión. En este tutorial voy intentar explicar todos los pasos al detalle a seguir y definir comando básicos, con el fin de que cualquier usuario pueda entenderlo. [1] - Encemos el PC y booteamos el Live CD de instalación de Microsoft Windows (nos valdría cualquier versión sería lo mismo. Simplemente tendremos que tener acceso a una "Consola de recuperación"). En este caso me base un Windows 7 Ultimate. Una vez se nos carga el LiveCD de la instalación de Windows, y accedemos a la primera ventana del asistente de instalación. Pulsamos en 'Siguiente' -> Reparar el equipo -> esperamos que se nos carge las 'opciones de recuperación de sistema' -> pulsamos en 'Siguiente' -> se nos mostrará una nueva ventana en la que elegimos la opción "Símbolo del sistema". [2] - Cuando se nos muestra la ventana de símbolo del sistema, ejecutada por defecto como Administrador local. Escribimos lo siguiente: Código: C: cd \windows\system32 ren sethc.exe sethc.ejm copy cmd.exe sethc.exe exit Después de cada instrucción, para la confirmación presionamos la tecla Enter. Explicación: sethc.exe -> Fichero ejecutable que hace llamada a las StickyKeys (teclas pegajosas o teclas espeiales), esta lo que hace es que cuando, por ejemplo, pulsamos la tecla "Shift" (mayusculas, derecha o izquierda) del teclado 5 veces seguidas, nos salga una ventana que nos permite activar o desactivar dichas teclas. cmd.exe -> Fichero ejecutable que hace llamada al Símbolo del sistema de Windows > C: Entramos en la unidad c: por defecto, o la letra que tengamos asignada al disco local donde almacenemos la instalación de Windows. > Con el comando cd: Entramos en los direcctorios de del disco local especificados, que en este caso es donde se encuentras los ficheros en los que haremos las modificaciones necesarias. > Con el comando ren: Básicamente lo que se está haciendo es, renombrar, cambiándole la extensión, al fichero original 'sethc.exe' por 'sethc.ejm'. Por que ejm?, es indiferente podemos poner lo que queramos, siempre que no supere las 3 letras de extensión. Elegí: ejm (ejemplo) "por poner algo". Pero como ya digo esto no tiene relavancia, simplemente se hace para que no se tenga concordancia cuando posteriormente se copie la cmd.exe por sethc.exe. > Con el comando copy:Después se copia la cmd.exe por sethc.exe, como sethc.exe lo habíamos renombrado a sethc.ejm el fichero sethc.exe no existe, supuestamente. Entonces lo que hacemos es crear una cmd.exe original pero con el nombre sethc.exe. De este modo, se conseguiría que cuando llamemos a las StickyKeys, se nos abra un Símbolo del sistema (CMD). > Con el comando exit: Salimos del símbolo del sistema. [3] - Una vez acabado el paso 2, reiniciamos el PC en el botón "Reiniciar" en la ventana de 'Opciones de recuperación del sistema'. Iniciamos el equipo sin bootear el LiveCD de instalación de Windows, es decir que lo inicializamos de manera normal. [4] - En la pantalla de bienvenida, pulsamos 5 veces seguidas la tecla "Shift" (Mayusculas) izquierda o derecha, nos funcionará igual. Ahora, se nos abrirá el cmd.exe o Símbolo del sistema de Windows. Y escribimos: Código: control userpasswords2 Nota: También podríamos poner: netplwiz, es lo mismo y nos llevaría a la misma ventana gráfica. [5] - Se nos abrirá la ventana de 'Cuentas de usuario', si no apareciese en ese momento en la pantalla de bienvenida, reiniciamos y volvemos a realizar el paso 4 y no tendrá que aparecer. Pues en esta ventana podremos restablecer la constraseña del usuario que seleccionemos. En este ejemplo, se trata de una cuenta tipo Adminsitrador con el nombre de usuario "1loiswin7". Una vez seleccionamos el usuario podemos pulsar en el botón "Restablecer contraseña" he introducir la constraseña nueva sin necesidad de que nos pregunta la contraseña que hubiese anteriormente. 'Aplicamos' y 'Aceptamos' los cambios. (O simplemente 'Aceptar' sería lo mismo) Aunque en la captura de pantalla de arriba no muestro la ficha o pestaña "Opciones avanzadas" de la ventana 'Cuentas de usuario', en esta podremos elegir una cuenta de usuario de tipo 'limitada' y cambiarla por una de tipo 'Administrador' o viceversa, así como también agregar dicho usuario seleccionado a un grupo local que hubiesemos creado previamente o los incluidos por defecto del sistema, esto solo para Windows XP. En Windows Vista o 7 veremos otro aspecto similar en el que podremos administrar las contraseñas de la base de datos local SAM de Windows y entrar en la ventana 'Usuario y grupos locales' (lusrmgr.msc) con la cual también podremos realizar lo mismo que en Windows XP. Incluso también crear o agregar un nuevo usario, establecerle una constraseña y asignar la cuenta a tipo determinado. Y también marcando y desmarcando el checkbox en el que dice: 'Los usuarios deben escribir su nombre y contraseña para usar el equipo', con esto desmarcado conseguiremos que el usuario que seleccionemos inicie sesión automáticamente o marcando la casilla se haga lo contrario. [6] - Y por último iniciamos sesión en el sistema con el nombre de usuario y contraseña que restablecimos. Y ya estaremos dentro, para hacer las modificaciones necesarias, así como cambiar a una nueva contraseña o lo que fuese. [7] - Ahora, como paso final, dejaremos o restableceremos los ficheros modificados (sethc y cmd) a su estado original o default. Para ello una vez que estamos ya dentro del sistema ejecutamos un "Símbolo del sistema" como administrador. Para ello, vamos a: Inicio -> Todos los programas -> Accesorios -> y botón derecho en 'Símbolo de sistema' -> Ejecutar como administrador. Si tenemos ativado el UAC (User Account Control) de Windows, nos saldrá una ventana informativa 'Control de cuentas de usuario', que nos preguntará si deseamos que se hagan cambios en el sistema, le decimos que si. Una vez abierto el CMD y estar situados en la ubicación: C:\Windows\System32 En el caso de no estarlo, escribimos en el CMD: Código: C: cd windows\system32 Una vez estemos en dicho direcctorio (lo cual por defecto lo está, si ejecutando el CMD con privilegios administrativos) simplemente tendríamos que escribir en el CMD: Código: del sethc.exe ren sethc.ejm sethc.exe exit Explicación: > Con el comando del: Borra ficheros y direcctorios, en este caso borraría el fichero sethc.exe. > Y los comandos ren: (renombrar nombres de ficheros) y exit (salir del CMD), ya se comentaran anteriormente. Lo que se está haciendo, es borrar el fichero sethc.exe que es una copia del cmd.exe original. Después renombramos el fichero sethc.ejm a sethc.exe, el sethc.ejm que es el fichero del sethc original. Por lo tanto, lo dejamos como estaba para que a la hora de llamar a la ejecución de las StickyKeys este se ejecute correctamente. Y con la copia del cmd borrada y el fichero del sethc en su estado original, daremos por acabado la configuración. Espero que este tutorial ayude aquell@s usuari@s, que no recuerdan su contraseña y de este modo haya una solución al problema. Y no utilizar este pequeño hack maliciosamente... -Saludos-

martes, 21 de agosto de 2012

Problems to log in without domain connection

I am having an strange issue.
When I am not connecting to the domain (trough wifi or wired) I can not log on in any machine with an user.
But if I try with a diferent user, I can log in without connection.

I am investigating the problem, and I found an intrasting blog where explain all tha cashe configuration in Windows 7

http://4sysops.com/archives/series/stored-windows-passwords/


Forum with a similar problem
http://www.techexams.net/forums/windows-7-exams/67666-windows-7-logon-cached-credentials.html

Microsoft Technet information
http://technet.microsoft.com/en-us/library/cc780332(WS.10).aspx

Exchange 2010: How to Grant Send As Permissions for a Distribution Group


In this article I’ll show you how to grand send as permissions for distribution groups in Exchange 2010. If you’re not sure what the difference is between “send as” and “send on behalf” it is as simple as this:
  • “Send on behalf” is when the email message has a From address of “Person A on behalf of Person B”. This is fairly common with executives and their assistants who send things like meeting invitations on the exec’s behalf.
  • “Send as” is when the message has a From address of Person B with no indication that it was actually sent by Person A. In other words this is more like impersonation, whereas “send on behalf” is more like delegation.
So let’s take a look at this scenario. Here we have Alannah Shaw, a member of the Payroll department, sending an email to Alan Reid and attempting to send as “Payroll Team”, which is a distribution group.
The email is not delivered because Alannah does not have permissions to send as the Payroll Team group.
Fortunately configuring “send as” permissions is not difficult at all. There are two ways to grant the permissions.
  • Grant send as permissions to a mailbox user (eg, grant Alannah Shaw permission to send as “Payroll Team”)
  • Grand send as permissions to a universal security group (eg grant “Payroll Team Leaders” permission to send as “Payroll Team”)
You can grant the permissions by using Active Directory Users & Computers. Simply open the properties of the group, switch to the Security tab, add the mailbox user or group, and then tick the Send As box and apply the change.
After making this change you may notice that it does not take effect for up to 2 hours. This is due to caching on the Exchange servers. Though you can speed up the change by restarting the Information Store that is obviously not going to be practical in most production environments, so you’ll often find that you just need to wait.
Once the change has taken effect the user can send as the distribution group.

If the Security tab doesn’t appears, in your Active Directory User and Computer (ADUC) go to View and select Advance Features.


Before to select Advance Feature’s view



Now the Security tab will be there for you J




martes, 7 de agosto de 2012

Task Manager Gadget

Task Manager Gadget

To install a powerfull task manager Gadget, you just need enter to the next link:

CPU Usage it's a powerfull task manager gadget with information about CPU usage, mem usage, and temperature Usage too.