Easy way to add DNS server to Centos 6

The minimal install of Centos 6.2 is exactly that. Very minimal while this is good for appliances if you dont know your way around linux and vi it could be a bit hard to get a network connection going.

Here are a few tips i have picked up.

Setup a IP address on a nic

ifconfig eth0 netmask up
this will add a default gateway
route add default gw
These settings will be removed from the server on reboot. 
Run this to make the nic come up on boot automatically.
# cd /etc/sysconfig/network-scripts/ 
# sed -i -e 's@^ONBOOT="no@ONBOOT="yes@' ifcfg-eth0

To put a dns server in try

echo “nameserver” > /etc/resolv.conf

This adds the google dns server to the resolv.conf file and your ready to go.

If you want to use a GUI to setup a perminate IP address try

yum install system-config-network-tui

then system-config-network-tui

Posted in: Blog

Leave a Comment (0) →

Add printer with vbscript and enable snmp on tcp port

I like using VB Script to automate tasks and use them on logon scripts.

strComputer = "."
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" & strComputer & "rootcimv2")

‘Install TCP/IP Port :

Set objNewPort = objWMIService.Get(“Win32_TCPIPPrinterPort”).SpawnInstance_

objNewPort.Name = “IP_192.168.1.10” ‘Change to TCP/IP port name you want created.
objNewPort.Protocol = 2
objNewPort.HostAddress = “” ‘ Change to the ip address of the printer or the hostname
objNewPort.PortNumber = “515” ‘ Change to the port number normally 9100 or 515 for brother printers
objNewPort.Queue = “BINARY_P1” ‘ Change to Queue name
objNewPort.SNMPCommunity = “public” ‘ Normally just public
objNewPort.SNMPEnabled = True

‘Stop Spooler Service

Set colServiceList = objWMIService.ExecQuery _
(“Select * from Win32_Service where Name=’Spooler'”)
For Each objService In colServiceList
errReturn = objService.StopService()
WScript.Sleep 5000

‘Start Spooler Service

For Each objService In colServiceList
errReturn = objService.StartService()
WScript.Sleep 5000

‘Install Driver :

objWMIService.Security_.Privileges.AddAsString “SeLoadDriverPrivilege”, True

Set objDriver = objWMIService.Get(“Win32_PrinterDriver”)
objDriver.Name = “Brother MFC-6490CW Printer” ‘ Change to the driver name that matches INF file
objDriver.SupportedPlatform = “Windows NT x86”
objDriver.Version = “3”
objDriver.FilePath = “s:\printer\” ‘ Path to the print drivers
objDriver.InfName = “s:\printer\brprbh97.inf” ‘ Path to the INF file
intResult = objDriver.AddPrinterDriver(objDriver)

‘Install TCP-Printer :

strComputer = “.”
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\” & strComputer & “rootcimv2”)

Set objPrinter = objWMIService.Get(“Win32_Printer”).SpawnInstance_

objPrinter.DriverName = “Brother MFC-6490CW Printer” ‘ Must match driver name
objPrinter.PortName = “IP_192.168.1.10” ‘ Must match port name created above
objPrinter.DeviceID = “Brother MFC-6490CW Printer” ‘What ever you want to name the printer
objPrinter.Network = True
objPrinter.Shared = False
objPrinter.ShareName = “”
objPrinter.Published = False
objPrinter.Location = “A3 Printer Upstairs” ‘Location of the printer


Posted in: Blog

Leave a Comment (0) →

How to Change TeamViewer ID after cloning

If you’ve cloned a machine that already has team viewer installed, the clone will have the same ID as the source machine.  Each machine needs it’s own unique ID.  To get the clone to pick up a new ID by deleting 2 registry keys, ClientIC and ClientID.

for 64 bit Windows 7 I found the key here…
for 32 bit Windows 7 and XP the keys are here…

This won’t work on the source machine.  The calculation that determines the ID uses hardware identifiers which haven’t changed and TeamViewer will therefore produce the same ID as before.




Posted in: Blog

Leave a Comment (6) →

SPausnet Meters

HI I found this useful info on whirlpool and thought i might share it.

These are the display registers for Landis & Gyr EM1200 Meter installed in the SP Ausnet distribution area in Victoria.

ID #……………. Description

001 ……………. Time
002 ……………. Date
003 ……………. kWh Total Usage
004 ……………. Peak Usage
006 ……………. Off Peak Usage
007 ……………. kWh for Hot water or Floor heating
013 ……………. Total Exported Energy sent back to the grid
014 ……………. kWh Peak exported energy
016 ……………. kWh Off Peak exported energy
030 ……………. Program setting

Peak Times: 07:00AM to 11:00PM Monday-Friday

Off Peak Times 11:00Pm -7:00Am Monday-Friday and all day Saturday and Sunday.

The meter updates every 30 minutes and the usage and exported energy accumulates.


For the United Energy distribution area, only the registers 1, 2, 3, and 13 appear, with the same meanings as for SP Ausnet. – Thanks to Ghostgums for United Energy information.

Posted in: Blog

Leave a Comment (0) →
Page 15 of 15 «...101112131415