IT Technical Stuff

Information for the IT Community - Tweaks and Solutions for the Microsoft Windows Systems and Linux.

Sep 13, 2011

Software: Virtual CloneDrive

This one allows you to mount an image of a CD/DVD into a Drive and works with XP, Vista and Windows 7.


http://www.slysoft.com/en/virtual-clonedrive.html

Virtual CloneDrive works and behaves just like a physical CD/DVD drive, however it exists only virtually. Image files generated with CloneDVD or CloneCD can be mounted onto a virtual drive from your hard-disk or from a network drive and used in the same manner as inserting them into a normal CD/DVD drive.

Obtaining the Machine Serial Number in command-line

There is a simple command-line command that can return the machine serial number (and other information of-course).
The command:

wmic bios get SerialNumber

Returns:
SerialNumber
TheSerialNumber


Sep 12, 2011

Powershell: Enable running unsigned scripts

To enable Powershell profile (it's an unsigned ps1) you must set the policy to either:
- RemoteSigned – Downloaded scripts must be signed by a trusted publisher before they can be run.
- Unrestricted – No restrictions; all Windows PowerShell scripts can be run.

Execute the command in a PS shell, with an administrative user:

Set-ExecutionPolicy Unrestricted

Mar 30, 2011

Debian Tips - sudo

How to add a regular user to the list of sudoers?


run the following command (with root):
usermod user -G sudo

Note: You must finish the user session if you want the sudo command to work.

Jan 31, 2010

Allowing NAT-T for VPN on XP and Vista/Win7

After setting up everything regarding VPN in the ISA 2006 server I was not able to establish a VPN tunnel properly between a XP machine and the server.


The problem is related with NAT-T and how Microsoft handles traffic between the Client and the Server. It happens when the ISA Server doesn't have a public IP and there is a firewall between it and the Internet that does the NAT.


The solution is simple but very lowlevel. It requires some changes in the registry.


For XP:

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IPsec
  3. On the Edit menu, point to New, and then click DWORD Value.
  4. In the New Value #1 box, type AssumeUDPEncapsulationContextOnSendRule, and then press ENTER.
  5. Right-click AssumeUDPEncapsulationContextOnSendRule, and then click Modify.
  6. In the Value Data box, type one of the following values:
    • 0 (default)
      A value of 0 (zero) configures Windows so that it cannot establish security associations with servers that are located behind network address translators.
    • 1
      A value of 1 configures Windows so that it can establish security associations with servers that are located behind network address translators.
    • 2
      A value of 2 configures Windows so that it can establish security associations when both the server and the Windows XP SP2-based client computer are behind network address translators.
  7. Click OK, and then quit Registry Editor.
  8. Restart the computer.
(This steps were collected from the MS KB818043.)

For Vista/Win7:
  1. Log on to the Windows Vista client computer as a user who is a member of the Administrators group.
  2. Click Start
    , point to All Programs, click Accessories, click Run, type regedit, and then click OK. If the User Account Control dialog box is displayed on the screen and prompts you to elevate your administrator token, click Continue.
  3. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent
  4. On the Edit menu, point to New, and then click DWORD (32-bit) Value.
  5. Type AssumeUDPEncapsulationContextOnSendRule, and then press ENTER.
  6. Right-click AssumeUDPEncapsulationContextOnSendRule, and then click Modify.
  7. In the Value Data box, type one of the following values:
    • 0
      A value of 0 (zero) configures Windows so that it cannot establish security associations with servers that are located behind NAT devices. This is the default value.
    • 1
      A value of 1 configures Windows so that it can establish security associations with servers that are located behind NAT devices.
    • 2
      A value of 2 configures Windows so that it can establish security associations when both the server and the Windows Vista-based or Windows Server 2008-based VPN client computer are behind NAT devices.
  8. Click OK, and then exit Registry Editor.
  9. Restart the computer.
(This steps were collected from the MS KB926179.)

Putty setting the correct screen layout acessing a Linux Box

One of my favorite file managing applications under linux is midnight commander, since it has a text-mode 2 panel manager it has a clean interface allows managing files and folders in a simple maner.

One of the visually annoying problems that I get is the default setting of putty doesn't draw the vertical and horizontal lines of the mc gui correctly.

To make it all work correctly, you need to change the following configuration settings:

Terminal → Keyboard:

Change the sequences sent by: The Functions keys and Keypad:
Select Linux.

Window → Appearance:

Font settings:
Pick a font that contains the Unicode line drawing characters, such as Andale Mono or Lucida Console. (Unfortunately Vista’s gorgeous new Consolas font does not have those.)

Window → Translation:

Character set translation on received data:
Select UTF-8.
Adjust how PuTTY handles line drawing characters:
Select Use Unicode line drawing code points.

Connection → Data:

Terminal details: Terminal-type string:
Enter “linux”.

Terminal -> Features
check - Disable bidirectional text display

Now line drawing characters should show up as they are supposed to.
This was tested with putty running on vista accessing a Linux Fedora machine.