HOw to use md5sum

It creates a 128 bit checksum which is unique. So if two files are not identical they won’t have the same md5 checksum. You can use it to check if the file which you have download has not been manipulated or is corrupted.

Output of one file:
# md5sum sample.txt
d41d8cd98f00b204e9800998ecf8427e  sample.txt

Output of multiple files:
# md5sum *.txt
5aa6788f9355e26bd8aef7303dda97fe  sample2.txt
d41d8cd98f00b204e9800998ecf8427e  sample.txt

You can create your own md5 file and verify it afterwards:
# md5sum sample.txt > verify.md5
# md5sum –c verify.md5

admin on June 29th 2012 in IT, Linux

No Comments »

Google Picture Search

Well many people don’t know about this function. Let’s say you found a really nice picture but you don’t know from who it is.

Just go to:
1. http://www.google.com/imghp
2. Upload the picture
3. Do a Google Picture search and you might find out

admin on June 11th 2012 in IT, Search Engine

No Comments »

Error 2738. Could not access VBScript run time for custom action.

Today i tried to install VMWare vSphere PowerCLI and got the vbscript error message.

Follow this steps to solve the problem:

1. Create a backup
2. Delete following registry entries:

Win32 Bit
HKCU\SOFTWARE\Classes\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}
HKCU\SOFTWARE\Classes\CLSID\{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}

Win64 Bit
HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}
HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}

3. Run CMD as an Administrator
4. regsvr32 vbscript.dll
5. regsvr32 jscript.dll

admin on June 4th 2012 in IT, PowerShell, Windows

No Comments »

Powershell

Powershell is awesome.

Here a collection of some snippets:

Check who is accessing a file on a server:
net file | where {$_ –match “$filename”}

More:
Get-Service | Sort-Object -Descending Status | ForEach{if($_.Status
-eq “Running”){Write-Host $_.Name -ForegroundColor green} else {Write-Host $_.Na
me -ForegroundColor red}}

Get-Service | ConvertTo-Html -Property Name, Status | ForEach {if($_
-like “*<td>Running</td>*”) {$_ -replace “<tr>”, “<tr bgcolor=green>”} else {$_
-replace “<tr>”, “<tr bgcolor=red>”}} > .\get-service.html

Get-PSDrive | Sort-Object Used -Descendind

New-PSDrive -name FK -psprovider FileSystem -root C:\Temp\Powershell\Files

Set-Location FK:
Get-ChildItem * -Exclude *.tmp, *.temp | Select-Object name, length | Sort-Object Length, Name -Descending

Get-Alias | Sort-Object

Get-Service | Group-Object Status
Get-Service | Get-Member
Get-Service | where{$_.status -eq “stopped”}

Get-ChildItem | Group-Object Extension | Sort-Object Count -Descending
Get-ChildItem | Measure-Object length -average -sum -maximum -minimum
Get-ChildItem | where-object{$_.length -gt 2MB}
Get-ChildItem | where {$_.PSIsContainer}

$a=Get-ChildItem | Select-Object Extension | Sort-Object Extension -unique
$a | ForEach {“.\Neu”+$_.Extension} | ForEach {NewItem $_ -type directory}

$a=Get-ChildItem | where {$_.PsIsContainer -eq -0}
$a | foreach{Copy-Item $_.FullName (“.\Neu” + $_.Extension + “\” + $_.Name)}

Get-ChildItem | foreach{$_.IsReadOnly = -1}

Get-ADUser -Filter *
Get-Command *user*

admin on May 16th 2012 in PowerShell

No Comments »

Upgrade Problem with nagios from lenny to Squeeze in debian

Because lenny is no longer supported I had to upgrade our nagios monitor server from lenny to squeeze. After the upgrade the check_snmp commands timed out. After some research I found out because of a licensing issues snmpd with the mibs are no longer installed by default.

1. Edit Source List
First I had to change the /etc/apt/source.list and add “contrib non-free”.

It should look similar to this:
deb http://ftp.ch.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.ch.debian.org/debian/ squeeze main contrib non-free

2. Install SNMPD with the MIB List
#apt-get install snmpd
#apt-get install snmp-mibs-downloader

3. Download Mibs
#/usr/bin/download-mibs

4. Restart SNMPD
I’m not sure if this step is necessary. I actually even restarted the whole server.
#/etc/init.d/snmpd restart

admin on April 26th 2012 in IT, Linux

No Comments »

How to Shutdown Exchange 2007 Services

net stop msexchangeadtopology /y
net stop msftesql-exchange /y
net stop msexchangeis /y
net stop msexchangesa /y
net stop iisadmin /y

admin on April 2nd 2012 in Exchange Server, IT

No Comments »

Find old Computers/users in Active Directory

Easiest way is to use following query on your Domain Controller to find all computers which were inactive for 4 weeks:
dsquery computer –inactive 4

The same you could for users:
dsquery users – inactive 4

admin on March 22nd 2012 in Windows, Windows Server

No Comments »

Batch check if a Program or Service is running

tasklist /FI "IMAGENAME eq %PROGNAME%" 2>NUL | find /I /N "%PROGNAME%">NUL
if "%ERRORLEVEL%"=="0" echo Programm is running
if "%ERRORLEVEL%"=="1" echo Programm is not running

%PROGNAME% needs to be replaced with your program name.

admin on February 18th 2012 in IT, Windows

No Comments »

sendEmail from Bash over GMail

The syntax is following:
sendEmail -v –f $EMAIL_FROM -s smtp.gmail.com:587 -xu p$USERNAME –xp $PASSWORD –t $EMAIL_TO -o tls=yes –u $SUBJECT –m $MESSAGE

But after I tried it I got following message:
ERROR => No TLS support!  SendEmail can’t load required libraries. (try installing Net::SSLeay and IO::Socket::SSL

This fixed the problem:
apt-get install libio-socket-ssl-perl libnet-ssleay-perl

admin on February 10th 2012 in Linux

No Comments »

Color LInux Prompt

vi ~/.bashrc

To color it red change PS1 to:
export PS1=’\[\e[1;31m\][\u@\h \W]\$\[\e[0m\] ‘

After that you need to save it and reload it with:
source ~/.bashrc

admin on February 8th 2012 in IT, Linux

No Comments »




Check out new movies online website. Download and buy movies now.