Tuesday, March 15, 2011

How to install Terminal Services On Small Business Server (SBS) 2003


I've found this document that explains how to install Terminal Services in application mode on a Windows Small Business Server (SBS) 2003: http://www.bagsolutions.orconhosting.net.nz/

Before you start you have to had finished the small business server setup!!!!

This will show you how to do what M$ said you could in the pre release versions of SBS 2003 but can't in the final release. This does not crack nor get you to edit any of Microsoft's code. It just does what the install would have done. We have tested this as much as we could we cannot guarantee that it will work or be held liable for any errors, unforeseen or otherwise, that might occur.

Enjoy ;) Bob And Ge 26 Nov 2003

WARNING - People have Reported Problems with MMC after doing this. We found that it worked O.k. with only one console (window) open at a time.

Comments and Queries can be directed to BAG_Solutions@hotmail.com, but we aren't able to spend much time on this issue, so you might not get a reply.

  • Run the Following Command: (all on one line)
    %systemroot%\system32\rundll32.exe setupapi,InstallHinfSection TerminalServices.AppServer.x86 128 %systemroot%\inf\tsoc.inf

  • Reboot Computer after executing above command it will not show any sign that it has been completed
  • OPTIONAL: Reinstall Administration Tools from %systemroot%\system32\adminpak.msi - You only need to do this if you have problems with MMC. This won't fix the problem with multiple consoles not working, but can restore completely dead ones.
  • Set Permissions For Users In Local Security Policy, to allow logon through Terminal Services.
  • Turn On Tick Allow users to connect remotely to your computer in System Properties / Remote
  • Add Everyone Group To Permissions:
  • Reboot to finish installation

Wednesday, March 9, 2011

How to export/import group policies in Windows 2003


You must install Group Policy Management Console with Service Pack 1 from Microsoft download webpage: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0a6d4c24-8cbd-4b35-9272-dd3cbfc81887

Friday, February 18, 2011

PDFCreator as a Windows service

Here you can find a post that explains how to setup PDFCreator as a Windows service:
http://outputredirection.blogspot.com/p/running-pdfcreator-as-service-on-server.html

Combined with some other little tweaks it resolves the lack of printer drivers on windows 7 x64.

Wednesday, February 16, 2011

Setting Jumbo Frames in vSphere from esx console


#1. Login to the ESX host via SSH

#2. Add a vSwitch
esxcfg-vswitch -a vSwitch2

#3. Set the MTU valu for the new vSwitch
esxcfg-vswitch -m 9000 vSwitch2
#4. Add PortGroup
esxcfg-vswitch -A "iSCSI" vSwitch2

#5. Add VMKernel Int.
esxcfg-vmknic -a -i 10.100.1.11 -n 255.255.255.0 -m 9000 "iSCSI"

#6. Attach vmnics
esxcfg-vswitch -L vmnic3 vSwitch2
#esxcfg-vswitch -L vmnic8 vSwitch2

 
#7. Check if all is configured ok
esxcfg-vswitch -l #should show the vSwitch's MTU is now 9000.
esxcfg-nics -l #should show the MTU for the NICs linked to that vSwitch are now set to 9000 as well
esxcfg-vmknic -l #show VMkernel NICs and should be now set to 9000 as well.

#8. Ping SAN with a package size of 9000 to see if everything Works
vmkping -s 9000 10.100.1.15

PING 10.100.1.15 (10.100.1.15): 9000 data bytes
9008 bytes from 10.100.1.15: icmp_seq=0 ttl=64 time=0.531 ms
9008 bytes from 10.100.1.15: icmp_seq=1 ttl=64 time=0.452 ms
9008 bytes from 10.100.1.15: icmp_seq=2 ttl=64 time=0.451 ms

Does Open-E support Jumbo Frames?


Here you can find how to enable jumbo frames on Open-e appliances: http://kb.open-e.com/Does-Open-E-support-Jumbo-Frames_28.html
Open-E supports the use of Jumbo Frames.

Use Jumbo Frames to improve performance by sending fewer frames across the network, saving CPU time and consuming less bandwidth.  The standard recommendation for the size is 9000. 

The stipulation to using Jumbo Frames is that your network hardware, which includes Ethernet cards, switches, and routers, all need to support Jumbo Frames.  Check the specs on your Ethernet card to make sure Jumbo Frames are supported.  An example of one that does support them would be the Intel Pro/1000 CT.  So then you need to check the manuals on your switches and routers to make sure they also support Jumbo Frames, or check their websites with your model.  You'll need to know what you need to do to set your switches and routers to use Jumbo Frames.  Once your hardware has been verified, then it's just a matter of setting Jumbo Frames in the Console Tools of your Open-E server.

Go to the Hardware Tools
Ctl - Alt - W

Select Tuning Options
Select Jumbo Frames Config

Select the interface you want to set and set the number to 9000.

Wednesday, January 19, 2011

Sending Mails from command line in DOS

Here you cand find a free tool for sending mails from a DOS command line: http://www.smtpinfo.com/index.php

SMTP Mailer
This product makes it extremely simple to send an email from a command line. You can specify the sender and multiple recipients including CC and BCC. It also supports multiple attachemnts and server authentication. Some options only work on the purchased edition (not free).

Apple iPad VPN Connection to SonicWALL Firewall


Here is a document from SonicWall that explains how to connect an iPad/iPhone/iPod Touch to a SonicWall firewall using L2TP over IPSEC and using XAUTH.
http://www.sonicwall-sales.com/tech_info/apple-ipad-vpn-connection-to-sonicwall-firewall.html

Tuesday, January 18, 2011

Connecting to a W2008 shared folder from W2000 or XP clients


Recently I've tried to connect to a W2008 shared folder from a W2000 server without success, however I've found this information at http://www.petri.co.il/how-to-disable-smb-2-on-windows-vista-or-server-2008.htm and now it's working fine. This applies to windows XP clients too.

How to Disable SMB 2.0 on Windows Vista/2008

Server Message Blocks Protocol (SMB) is the file sharing protocol used by default on Windows-based computers. SMB 1.0 was designed for early Windows network operating systems such as Microsoft LAN Manager and Windows for Workgroups, but until Windows Server 2008 and Vista, all Microsoft-based operating systems continued to use it more or less in its original format.
SMB 2.0 was introduced in Windows Vista and Windows Server 2008. SMB 2.0 is designed for the needs of the next generation of file servers. Windows Server 2008 and Windows Vista support both SMB 1.0 and SMB 2.0 in order to preserve backward compatibility.
Some of the enhancements in SMB 2.0, include:
  • Sending multiple SMB commands in the same packet which reduces the number of packets sent between a client and server
  • Larger buffer sizes
  • Increased scalability, including an increase in the number of concurrent open file handles on the server and the number of shares that a server can share out
  • Support for Durable Handles that can withstand short network problems
  • Support of Symbolic Links
Testing done with copying large files between Windows Vista and Windows Server 2008, and then Vista to Windows 2003, have shown that by using SMB 2.0 the file copying was, in average, 2 times faster than with older operating systems.
However, while SMB 2.0 seems to do a good job if BOTH client and server OSs support it, in some cases it will slow things down. The reason for this is that the version of SMB used for file sharing is determined during the SMB session negotiation. If both the client and server support SMB 2.0, then SMB 2.0 is selected during the initial negotiation. However, if they don't both support it, SMB 1.0 will be used to in order to preserve backwards compatibility.
The SMB protocol version to be used for file operations is decided during the negotiation phase. During the negotiation phase, a Windows Vista client advertises to the server that it can understand the new SMB 2.0 protocol. If the server (Windows Server 2008 or otherwise) understands SMB 2.0, then SMB 2.0 is chosen for subsequent communication. Otherwise the client and server use SMB 1.0.
When using the terms "client" and "server" in case of file and print sharing, it does not necessarily mean that a client-type OS such as Vista "always" connects to a server-type Os such as Windows Server 2008. Sometimes, a Vista computer will connect to another Vista computer, and in that case, the computer that is "serving" the shares is considered to be the "server".
Here's how SMB is used when related to SMB versions:
  • When a Windows Server 2008/Vista "client" connects to a Windows Server 2008/Vista "server", SMB 2.0 is used.
  • When a Windows Server 2008/Vista "client" connects to a Windows 2000/XP/2003 "server", SMB 1.0 is used.
  • When a Windows 2000/XP/2003 "client" connects to a Windows Server 2008/Vista "server", SMB 1.0 is used.
  • When a Windows 2000/XP/2003 "client" connects to a Windows 2000/XP/2003 "server", SMB 1.0 is used.
So, for troubleshooting purposes, mostly in an environment that has mixes operating systems, you might want to consider disabling SMB 2.0. So you need to do on both the "client" and the "server" operating systems. To disable SMB 2.0 for Windows Vista or Windows Server 2008 systems that are the "client" systems run the following commands:
sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc config mrxsmb20 start= disabled
Note there's an extra " " (space) after the "=" sign.
To enable back SMB 2.0 for Windows Vista or Windows Server 2008 systems that are the "client" systems run the following commands:
sc config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
sc config mrxsmb20 start= auto
Again, note there's an extra " " (space) after the "=" sign.
In order to disable SMB 2.0 on the server-side computer, follow these steps:
Warning!
This document contains instructions for editing the registry. If you make any error while editing the registry, you can potentially cause Windows to fail or be unable to boot, requiring you to reinstall Windows. Edit the registry at your own risk. Always back up the registry before making any changes. If you do not feel comfortable editing the registry, please do not attempt these instructions. Instead, seek the help of a trained computer specialist.
  1. Run "regedit" on Windows Server 2008 based computer.
  2. Expand and locate the sub tree as follows.
    HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters
  3. Add a new REG_DWORD key with the name of "Smb2" (without quotation mark)
    Value name: Smb2
    Value type: REG_DWORD
    0 = disabled
    1 = enabled
  4. Set the value to 0 to disable SMB 2.0, or set it to 1 to re-enable SMB 2.0.
  5. Reboot the server.

Thursday, December 2, 2010

Fix Missing eth0 When Cloning Ubuntu VMware Virtual Machines

I've found this site: http://www.orzeszek.org/blog/2010/07/25/fix-missing-eth0-when-cloning-ubuntu-vmware-virtual-machines/ that explains how to resolve this issue:

Fix Missing eth0 When Cloning Ubuntu VMware Virtual Machines
by Chris on 25 July 2010

I ran into an annoyance trying to clone some Ubuntu LAMP virtual machines that I was using for website development. Every time I cloned the virtual machine, eth0 would go missing, and ifconfig would show only the loopback device, lo.

It turns out that when you clone a VMware virtual machine, the cloned virtual machine’s network interface gets a new MAC address (which, of course, it must to work on the same LAN). But Ubuntu, and many other Linux distributions, cache the old MAC address in a configuration file.

In Ubuntu, the file is /etc/udev/rules.d/70-persistent-net.rules. After cloning, it will contain a reference to the old network interface as eth0.

The easiest way to fix this problem is to simply delete the file. Ubuntu will regenerate it properly the next time it boots up.

sudo rm /etc/udev/rules.d/70-persistent-net.rules

After deleting the file, you need to reboot. After rebooting, ifconfig should show eth0 and everything should just work.

If you’re feeling less adventurous, you can rename the file to *.old so that you can restore it if something doesn’t work:

sudo mv /etc/udev/rule.d/70-persistent-net.rules /etc/udev/rule.d/70-persistent-net.rules.old

You can also edit the file to remove the old reference to eth0, and rename the new eth1 reference to eth0. But deleting the file and rebooting seems more convenient.

The relevant filename is slightly different in other Linux distributions. For example, in Debian, the filename is /etc/udev/rules.d/z25_persistent-net.rules.

P.D.: (03-08-2011) - In Suse 9 you must delete the file /etc/sysconfig/network/ifcfg-eth-id-xx:xx:xx:xx:xx:xx where xx:xx:xx:xx:xx:xx is the old MAC address.

Sunday, November 21, 2010

How can my bash script output Unicode?

Finally I found how to print Unicode characters from a bash script: http://forums.debian.net/viewtopic.php?f=10&t=45394

Here is the code from 'hedgie' that works for me:

for dec in {9472..9599} ; do
    hex=`echo "ibase=10; obase=16; $dec" | bc`
    /usr/bin/printf \\u$hex
done

Tuesday, November 16, 2010

VMware ESX 3 – use lwp-download to grab files

If you need to download an iso file from a ESX 3.x console, you can use the command lwp-download.

First http port must be opened at firewall level:
esxcfg-firewall -o 80,tcp,out,http

Then you can get a file with the command:
lwp-download <url> [<localfilename>]

And finally you should close http port at firewall level:
esxcfg-firewall -c 80,tcp,out,http

VMware ESX 4 – use cURL to grab files

I've found this information by Eric Gray at http://www.vcritical.com/2009/05/vmware-esx-4-use-curl-to-grab-files/

I need to quickly download an ISO image to my new VMware ESX 4 box and discovered that the cURL utility is now included — pretty handy.

If you have not used cURL, it is similar to wget. However, with no parameters cURL will spew the download to standard out — definitely not what you want in the case of an ISO image. Therefore, the -O option — capital O — can be used to save the downloaded file, preserving the filename. If you happen to be behind a proxy server, don’t forget to set the http_proxy environment variable — standard Linux procedure.
[root@cl-168 Storage1]# export http_proxy=http://proxy:3128
[root@cl-168 Storage1]# curl -O http://mirros.easynews.com/linux/ubuntu-releases/hardy/ubuntu-8.04.2-server-amd64.iso
Also you can connect using ftp protocol as follows:

curl -O ftp://myftpsite.com/filename --user myname:mypassword 

Friday, November 5, 2010

Random times in a batch file

You can use random times in a batch file using something like that:

echo randomize >C:\TMP\random.vbs
echo wscript.sleep Int(Rnd * 100000) >>C:\TMP\random.vbs
cscript C:\TMP\random.vbs
dir

Here is a more elaborated example (only for the vbs script):

TopWait=8       'Max. time to wait in hours
randomize
myrand = rnd()
Wait=Int(myrand * 3600 * TopWait)  'Time to wait in seconds

Hours=Wait \ 3600
Minutes=(Wait - (Hours*3600)) \ 60
Seconds=Wait - (Hours*3600) - (Minutes*60)

WScript.Echo "Waiting: " & Wait & " seconds => " & Hours & ":" & Minutes & ":" & Seconds
wscript.sleep Wait * 1000    'Must be in miliseconds
WScript.Echo "Done: " & Wait & " seconds sleeping"

REFERENCES

WScript.Sleep
Suspend the execution of the current script for the specified number of milliseconds.

Syntax
WScript.Sleep lngTime

Arguments:
lngTime is the delay in milliseconds

Example
WScript.Sleep(5000)
WScript.Echo("5 seconds have passed.")

Rnd
Return a random number

Syntax
Rnd[(seed)]

Key
seed A seed value of 0 will return the most recent random number
A seed value > 0 will return the next random number(default)
A seed value < 0 will return the same number

Example
myrand = rnd()
WScript.Echo myrand

Thursday, November 4, 2010

Unattended access to Netscreen devices from vb script


I've found this post at experts-exchange: http://www.experts-exchange.com/Software/Internet_Email/File_Sharing/SSH_Telnet/Q_22920318.html

Here is a VBScript that should do what you are looking for. Just remember your credentials are in plain text in the script, set your permissions accordiningly:

set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "C:\putty HOSTNAME -l LOGIN -pw PASSWORD"      ' put putty in C:\
WScript.Sleep 2000
WshShell.AppActivate "HOSTNAME - PuTTY"      'insert correct hostname
WshShell.SendKeys "command"             'insert dns refresh command
WScript.Sleep 100
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "exit"
WScript.Sleep 100
WshShell.SendKeys "{ENTER}"
You will need to put putty in you C:\ directory or give it an absolute path

Good Luck

Darkstriker69

Google Public DNS

Google has two free DNS servers at 8.8.8.8 and 8.8.4.4 IPs.
http://code.google.com/intl/es-ES/speed/public-dns/

Error connecting to 127.0.0.2 in XP SP2

Symptoms

With Windows XP SP2 some applications which connect to the loop back address range may not function as expected.

Cause
Windows XP SP2 prevents connections to the loop back address range for any address other than 127.0.0.1.

Resolution
Microsoft support has an update available which addresses this issue and is available for downloading at: KB884020

The fix contains the following file info:
13-Aug-2004 22:50 5.1.2600.2505 359,040 Tcpip.sys

This update helps resolve an issue on computers running Windows XP Service Pack 2. Programs that connect to IP addresses in the loopback address range may not work as expected and you may receive an error message indicating you cannot establish a connection. After you install this item, you may have to restart your computer.

Wednesday, November 3, 2010

Cannot Run Executable File Over Network Share On Windows Server

If you have installed the Internet Enhanced Security Configuration you cannot run any executable file from a network share.

To uninstall it you can go to http://www.visualwin.com/IE-enhanced-security/ and follow the instructions to uninstall Internet Explorer Enhanced Security Configuration for non-admin users, reboot, and viola!

Friday, October 29, 2010

Windows 2003 synchronize with a NTP Server

This info is based on  http://etherealmind.com/ios-configure-windows-2003-xp-use-ntp-server-sync-time-clock-router/

Stop the Windows Time Service using the CLI.
net stop w32time

You must configure your NTP Servers:
w32tm /config /manualpeerlist:"hora.rediris.es,europe.pool.ntp.org",0x8 /syncfromflags:MANUAL
The peer list must be enclosed
Use the 0×8 flag to force W32time to send normal client requests instead of symmetric active mode packets.

Restart the Windows Time Service and then force a sync.
net start w32time
w32tm /resync

Wednesday, October 27, 2010

Save Netscreen config file from CLI

I've found this deimark's post in experts-exchange that explains how to save the Netscreen's firewall configuration from CLI.

From the webui you can save a copy of the config hen you view it. I would suggest using tftp to do this.

ie set up a tftp server and enter the following commands:

get config > tftp <ip address of tftp server> config-file.txt

Similar to what you would do for backing up and upgrading the screenos image.

Namely to back up:
save config from flash to tftp <ip address of tftp server> <filename>

To upgrade your system:
save config from tftp to flash <ip address of tftp server> <filename> to flash
reset