2008/12/03

Postfix: Add or replace sender's full name with header_checks

CURRENT CONFIGURATION: Open SuSe 10.2, Postfix

OBJECTIVE: Add or replace sender's full name

ISSUE: Full Sender's name doesn't exist in field From: .

SOLUTION:
add to /etc/postfix/header_checks file next row:
/^From:.*no-reply@mydomain\.com/ REPLACE From: MyName

shell # postmap /etc/postfix/header_checks
shell # /etc/init.d/postfix restart

2008/12/01

VMware: Underlying file system does not support files that large

CURRENT CONFIGURATION: Windows XP SP2, Western Digital External USB disk with NTFS file system, VMware converter 3.0.3 build-89816.

OBJECTIVE: Convert VMware images from External Disk to VMware ESX Server 3i Version 3.5.0 Build 123629.

ISSUE: DISKLIB-SPARSE: "E:\Clones\filename.vmdk" : failed to open (36872): Underlying file system does not support files that large;
diskLib.sparseMaxFileSizeCheck= "false" in *.vmx file doesn't help;
Convert for mapped network drive doesn't help.

SOLUTION:
Copy files to local disk (with NTFS file system).

2008/11/26

Delete the WSUS Client ID's from registry by Logon script

CURRENT CONFIGURATION: Windows XP, 2003; WSUS 3; OS distribution method is cloning (imaging) of computers.
OBJECTIVE: Update all workstation and server trough WSUS
ISSUE: Computers override each other or not appear in WSUS console.
SOLUTION: When you clone (reimage) new computer from different either disk or clone image WSUS Client ID would be the same for either both or all recloned (reimaged) computers.
I've chosen VBS Login script approach to delete WSUS client ID's in registry.
The new WSUS ID's would be generated at "Automatic Updates" service start.
The computer would connect to WSUS server.
Please change MyCompanyName and MyDivisionName.
--- Start of code ---
'******************************************************************************
'   Author:  Vadims Zenins http://vadimszenins.blogspot.com
'   Version: 1.01
'   Date:    26/11/2009 18:18:44
'   Subroutine DeleteWSUSid
'   delete the WSUS Client ID's from the registry
'   and Restart service "Automatic Updates
'   Inputs - none
'   Call DeleteWSUSid()
'   WshShell.run "wuauclt.exe /resetauthorization /detectnow", 0, True
'******************************************************************************
Sub DeleteWSUSid()
  On Error resume next
' Stop service "Automatic Updates"
WshShell.run "net.exe stop wuauserv", 0, True

'Set the registry keypath that we are going to work with
strKeyPath = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate"
'Set the value name that we will use to create the registry marker
' (to determine if we've run the script before on this computer)
strKeyReportPath = "HKLM\SOFTWARE\MyCompanyName\MyDivisionName"
intValue = 1

If WSHShell.RegRead(strKeyReportPath & "\WSUSIDDeleted") <> "1" Then
strMessage = "Deleting WSUS IDs in registry: " & strKeyPath
'Show me a box for 3 sec.
WshShell.Popup strMessage,3
'Delete registry values
'strMessage =  "Deleting " & strKeyPath & "\AccountDomainSid"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\AccountDomainSid"
'strMessage =  "Deleting " & strKeyPath & "\PingID"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\PingID"
'strMessage =  "Deleting " & strKeyPath & "\SusClientId"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\SusClientId"
'strMessage =  "Deleting " & strKeyPath & "\SusClientId"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\SusClientIdValidation"

'Create Key in registry for report
WSHShell.RegWrite strKeyReportPath & "\WSUSIDDeleted", intValue, "REG_DWORD"
WSHShell.RegWrite strKeyReportPath & "\WSUSIDDeletedDate",Now

Wscript.Sleep 2000
' Start service "Automatic Updates"
WshShell.run "net.exe start wuauserv", 0, True

Else
End If

End Sub
'******************************************************************************

--- End of code ---

Download md5: 12d50a1db2af39c1a68884a107fccc43
LINKS: Delete the WSUS Client ID's from registry by Powershell script

VMware ESX server 3i: Unable to find a supported device

CURRENT CONFIGURATION: Supermicro server 5015M-NTV with SATA disk

OBJECTIVE: Install VMware ESX server 3i

ISSUE: Error message appears during the installation
VMware ESX Server 3i 3.5.0 Installer.
Installation operation Failed!
The installation operation has encountered a fatal error: Unable to find a supported device to write the VMware ESX Server 3i 3.5.0 image to.
System Information:
Manufacturer: Supermicro
Model: PDSMU

SOLUTION:
Set in BIOS next settings:
Serial ATA - enabled
SATA Controller Mode: Enhanced
SATA AHCI: Enabled.

2008/11/19

Primary Certificate automatic enrollment in Active Directory

CURRENT CONFIGURATION: Windows Domain on Windows Server 2003 SP2

OBJECTIVE: Primary Certificate automatic enrolment (distribution) and keeping in Active Directory

ISSUE: DIMS User's Group Policy does not work on non domain controller server.

SOLUTION:
Follow the instruction
Request files KRdeploy.cmd and KRdeploy.js from Microsoft Support.
Use DIMS.adm from Microsoft page instead of file DIMS.adm, sent by support.

2008/10/01

WSUS 3 SP1 and remote MS SQL Database with nonstandard IP port

CURRENT CONFIGURATION: Windows 2003 R2 x64 SP2, WSUS 3.0 SP1 and remote MS SQL 2005 server with non standard IP port.

OBJECTIVE: Connect to WSUS administration console.

ISSUE: WSUS administration console responds: Cannot connect to 'yourWSUSserverName'. SQL server may not be running on the server. Please verify that SQL Server is running and configured correctly on the server.
Application Event ID: 7032
The WSUS administration console was unable to connect to the WSUS Server via the remote API.
Verify that the Update Services service, IIS and SQL are running on the server. If the problem persists, try restarting IIS, SQL, and the Update Services Service.
The WSUS administration console has encountered an unexpected error. This may be a transient error; try restarting the administration console. If this error persists,
Try removing the persisted preferences for the console by deleting the wsus file under %appdata%\Microsoft\MMC\.


SOLUTION:
Just in case delete the files under %appdata%\Microsoft\MMC\
Check YourSqlServerName in registry "HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup\SqlServerName"
Try connect to SQL server with command:
sqlcmd -S YourSqlServerName,IPport -E -d SUSDB
If you connected successful change value of registry "HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup\SqlServerName" to YourSqlServerName,IPport
Restart WsusService
Try open the
WSUS administration console.

Links: Troubleshooting database issues
TAGS: wsus, MSSQL, SQL server, WSUS remote database

2008/09/29

Check on Nagios the latest files in folder with NSClient++

CURRENT CONFIGURATION: Linux OpenSuSe, Nagios 3.0.1, NRPE; Windows 2003 x64 server, NSClient++ 0.3.5.1

OBJECTIVE: Monitor SQL backup with Nagios. Check FOLDER with SQL backup files. Send WARNING if ALL files *.bak are older than 24 hours.

SOLUTION:
NRPE has to work on Nagios server and on Windows client computer with NSClient++.
Nagios server command.cfg file:

define command{
command_name check_nrpe_file_new
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c CheckFile2 -a file="$ARG1$" filter=in filter+creation=\<"$ARG2$" syntax="%filename% was created %creation%" MinWarn=0 #MinCrit=0 }

define command{
command_name check_nrpe_file_mod
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c CheckFile2 -a file="$ARG1$" filter=in filter+written=\<"$ARG2$" syntax="%filename% was modified %write%" MinWarn=0 }


Nagios server somename.cfg file:

define service{
...
check_command check_nrpe_file_new!X:\\FOLDER\\TX\\*.trn!35m
normal_check_interval 60
}

define service{
...
check_command check_nrpe_file_mod!X:\\FOLDER\\*.bak!30h
normal_check_interval 60
}


NSClient++ NSC.ini file:

[modules]
NRPEListener.dll
[NRPE]
allow_arguments=1
allow_nasty_meta_chars=1


Big thanks to NSClient++ author for program and excellent support.
P.S. I use
NSClient++ 0.3.6.316 (10/09/2009). For NSClient++ 0.3.9.330 2011-09-02 please read article Check on Nagios the latest files in folder with NSClient++ 0.3.9

TAGS: Nagios, Windows server, file age

2008/09/26

Linux: Login with putty client to SSH takes long time

CURRENT CONFIGURATION: Linux Open SuSe

OBJECTIVE: Login with putty client to SSH

ISSUE: Password request of putty client to SSH takes long time

SOLUTION:
Add or change in file /etc/ssh/sshd_config on your SSH server
UseDNS no

Restart SSH daemon
>rcsshd restart

Tags: Linux, SuSe, SSH, long time

2008/09/17

Issue: Unable to complete the operation on "File Replication Service"

CURRENT CONFIGURATION: Windows Server 2003 SP3 +Fixes, Domain Controller

OBJECTIVE: View "File Replication Service" event log in Event Viewer.

ISSUE: When you clicked on "File Replication Service" in Event Viewer you get Unable to complete the operation on "File Replication Service". The security descriptor structure is invalid.
In Application Event log you have warnings with Event ID: 3007 and description "Error opening event log file File Replication Service. Log will not be processed. Return code from OpenEventLog is 1338."

SOLUTION:
backup Registry [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\File Replication Service]
Open Registry on a Domain Controller with working "File Replication Service" Event log. Open [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\File Replication Service]. Copy value of "CustomSD" to clipboard.
Open Registry on the server with "File Replication Service" Event log view issue. Open [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\File Replication Service]. Paste clipboard to value of "CustomSD".
Check "File Replication Service" in Event Viewer.

TAGS: windows server,
File Replication Service, Event Viewer

2008/09/11

Dell PowerVault 124T Autoloader appears with exclamation mark in Device Manager

CURRENT CONFIGURATION:
Hardware: SuperMicro 7XDB3 with on-board Adaptec RAID controller, Adaptec SCSI Adapter 29320LPE; Tape Library Dell PowerVault 124T
Software: Windows 2003 x64 SP2 + Fixes, Symantec Backup Exec 11d

OBJECTIVE: Use tape library with Backup Exec

ISSUE: Dell PowerVault 124T Autoloader appears with exclamation mark in Device Manager. Installation of Symantec Backup Exec 11 services pack 3 does not help. Update driver for Dell PowerVault 124T Autoloader is freezing.

SOLUTION:
Uninstall on server Dell PowerVault 124T Autoloader and IBM ULTRIUM III TAPE DRIVE
Shutdown the server
On Front Panel of Dell PowerVault 124T change SCSI ID to different except 7. SCSI ID 7 uses usually SCSI controller by them self. I changed SCSI ID for tape library from 6 to 5.
Shutdown the tape library
In the server move Adaptec SCSI Adapter 29320LPE to different slot.
Take a cup of either coffee or tee, watch to window if you have it.
Start the server and press Ctrl+A when BIOS information of Adaptec SCSI Adapter 29320LPE appears.
Change setting for your selected SCSI ID for tape library (my is 5) to LUN ENABLE. Save changes. Shutdown the server.
Power on the tape library Dell PowerVault 124T
Wait some minutes.
Power on the SuperMicro 7XDB3 server
Open "Symantec Backup Exec 11d for Windows Servers", check Devices and start Inventory.

TAGS: Symantec Backup Exec, Backup, SCSI, Autoloader, Tape changer

2008/09/09

Symantec Backup Exec 11d migration from 1st server to 2nd server

CURRENT CONFIGURATION:
SERVER01 (old hardware): Windows 2003 x64 SP2, Symantec Backup Exec 11d SP3 fixes 47, 48
SERVER02 (new hardware): Fresh installation of Windows 2003 x64 SP2, Symantec Backup Exec 11d SP3 fixes 47, 48
Both servers are in Windows Domain.

OBJECTIVE: Copy (migrate) Backup Exec configuration from SERVER01 to SERVER02.

ISSUE: Standard Symantec's aproach How to copy media server configuration to a file and apply the copied media server configuration doesnot work. "Apply Copied Media Server Configuration" operation og BEUtility returns error: "The remote procedure call failed and did not execute"

SOLUTION:
Backup BEDB database on SERVER01 and copy the file to SERVER02
Copy from old to new server next folders: Catalogs, idr
Copy from old to new server *_someaccountname.xml files and BEDB.bak in Data folder.
Rename SERVER01 to SERVER01OLD and restart the server.
Check all changes in DNS
On SERVER02 change "Backup Exec Device & Media Service" service type to Disabled and stop one.
Restore BEDB database on SERVER02 with "Overwrite the existing database" options
Rename SERVER02 on new hardware to SERVER01 and restart the server.
Check all changes in DNS
On SERVER01 on new hardware change "Backup Exec Device & Media Service" service type to Automatic.
Start BEUtility.exe; Select SERVER02; Under Services Task click on the "Update Configuration for New Media Server Name"
Type in "Current domain name" field your.domain.name; in "Current media server name" SERVER01; in "Previous domain name" field your.domain.name; in "Previous media server name" SERVER02; Click on the OK


Open "Symantec Backup Exec 11d for Windows Servers" and check your Jobs, Policies, templates, selection lists, Logon information, Media sets etc.
On SERVER01 on new hardware change "Backup Exec Device & Media Service" service type to Disabled and stop one.
Rename SERVER01 on new hardware back to SERVER02 and restart the server.
Check all changes in DNS

On SERVER02 on new hardware change "Backup Exec Device & Media Service" service type to Automatic.
Start BEUtility.exe; Select SERVER01; Under Services Task click on the "Update Configuration for New Media Server Name"
Type in "Current domain name" field your.domain.name; in "Current media server name" SERVER02; in "Previous domain name" field your.domain.name; in "Previous media server name" SERVER01; Click on the OK
Open "Symantec Backup Exec 11d for Windows Servers" and check your Jobs, Policies, templates, selection lists, Logon information, Media sets etc.

Finaly rename SERVER01OLD on old hardware back to SERVER01 and restart the server.
Check all changes in DNS
On SERVER01 change "Backup Exec Device & Media Service" service type to Disabled and stop one.

Links: backup the index

TAGS: backup, Backup Exec, Symantec Backup Exec, Backup Exec copy, Backup Exec migration