XYMON -> New BBWin Client GUI 1.1 Released.

Are you looking for a BBWin Client GUI to configure BBWin.cfg?

Can I see by raise of hand how many of you out there wishes for a good BBWin GUI so you don’t have to edit a that bloody XML file. I am having to flip between Wordpad, Task Manager and the Services console to place in the services and processes I want to monitor on my Windows hosts and that was such a pain.

So out comes BBWin-GUI!

Download file –> BBWin-GUI-1.1

 

BBWin is an open source client for Windows working with BigBrother or Xymon(Hobbit) monitoring software. We also have a custom VM appliance with XYmon and Cacti pre installed and ready to go. See MAG Server here on Squidworks for more information.

Our new BBWin GUI will read in your current BBWin.cfg file and then allow you to edit it. It provides all the services and processes running on your system and pulls all the unique event logs so  you may choose what to accept and what to ignore. Inside the new BBWin-GUI you will find your local disks and the ability to exclude disks as well as set the thresholds for warnings and panics.  Checkout some of the screen shots below.  Download and try BBWin GUI.

 

 

 

 

 


 

 

 

 


 

 

 

 


 

As always I hope this little app helps someone out there.

Enjoy

Cubert

RetrieveStorageInfo request is ignored because the VM is in an invalid state: bad config = false

RetrieveStorageInfo request is ignored because the VM is in an invalid state: bad config = false could be produced as a possible error when the VMX file is invalid. During different activities that the ESX system is doing and during this activity the ISCSI disks are lost or something get in the way where a snaphot or some other process gets funked up. Can leave items in your VMX file that are invalid. When you recover from a loss you may find a system in a “Unknown” state.

Look throught your VMX file for odd spaces or items that may have invalid data in it.

Then re-attach the VM and see if it will showup correctly in your Vcenter server.

How-to : Pass a username and password to Windows shutdown.exe command.

Here was my scenario I found myself in not to long ago. I have an Active Directory domain with a server outside of the domain in it’s own workgroup. It used different credentials for the administrator account then what the domain uses. One day it stopped responding to RDP and several control programs we have on it so we needed to do a reboot.

No problems right? just type in the command below:

shutdown /r /t 3 /m \\ServerName

 

Not so right, right off the bat we get  ServerName: Access is denied.(5)

That’s right we do not have permissions “Yet”… But how do we send permissions to shutdown.exe ? If you do a shutdown /? you will find no switches for username and password but there is a way around this.

We will connect to the servers IPC$ and authenticate then we will run our command. Here is what you do:

First lets make a connection and authenticate by running the following cmd:

NET USE \\MyServer\IPC$ mypassword /USER:myuser

 

If successful then we are now ready to run the shutdown cmd in the same window:

shutdown /r /t 3 /m \\ServerName

Wait a few seconds and and you should get back your prompt which tells you the command was sent successfully. You now have authenticated and sent the shutdown cmd to a remote server using different permissions.

I hope this helps someone out there

Enjoy

Cubert

How-to: Setup Ubuntu and PHP to use MSSQL Microsoft SQL Server

It is easier to get PHP on Ubuntu to connect to MSSQL than it is to get PHP on Windows.

 

I would not normally believe such a thing until I tried to setup a pre-existing install of PHP on Windows missing any MSSQL extensions. Looking through Google to find information was less than quick and I found myself wanting to go back to my old faithful Ubuntu server, but how?

Here are my 10 quick steps to get PHP seeing MSSQL:

There are some basic software we will need to grab using apt-get, then we will install them and modify the php.ini file to update the new extension. I will go over the process below on how to install and in what order but before we do that I will give you a brief description of what we are doing.

We will need to get the source for PHP, we will also need the PHP Development packages. We will be installing FreeTDS and then editing our php.ini file. Lastly restarting Apache to complete the process.

For the rest of this we will assume you have ( sudo su -) so you do not need to sudo each cmd, but if not then add sudo where it applies. We are also assuming you already have a working php system and only need to add MSSQL functionality.

  1. apt-get source php5 – This will install the PHP source in the the current directory that you are in.
  2. cd php5-5.3.2/ext/mssql – This will place you in the PHP source directory for MSSQL. You may need to edit the directory path as 5.3.2 was the version as of this document and may not be the same version you are installing.
  3. apt-get install freetds-dev – This installs the extra libraries we will need for MSSQL
  4. apt-get install php5-dev – This installs the application (phpize) which we will use next to help build the MSSQL extension.
  5. phpize  – Run this while inside the (/ext/mssql ) directory
  6. ./configure –with-mssql – This creates the MakeFile we will need to build the extension from source.
  7. make – This cmd builds the extension.
  8. cd modules – move in to the module directory.
  9. cp mssql.so /usr/lib/php5/20090626   – Here you will need to pay close attention to the last directory here. This will very based on your version so change the numbers to fit what you have in your (/usr/lib/php5) directory.
  10. vi /etc/php5/apache2/php.ini – We want to go down to where you will find (Dynamic Extensions) and add on a new line the following -> extension = mssql.so then save and close the vi session ( Esc : wq)

You are all done, just restart Apache and test your mssql_connect

Restart Apache:

/etc/init.d/apache2 restart

Enjoy

Cubert

Increasing MS Exchange 2010 message size limits

There’s a few places you must go to change this and that is in global settings under Organization Configurations as well as the HUB Transport connectors under Server Configuration.

To modify the global settings go to the following menu areas inside you Exchange Management Console. 

Organization Configuration->Hub Transport->Global Settings tab->Properties of Transport Settings

 

Here you can adjust your transport send/receive limits by editing the properties.

Then you must modify the connectors found inside the Send Connectors tab 

Organization Configuration->Hub Transport->Send Connectors tab->Properties of Default Send

 

Then you can adjust your send connectors default maximum message size under Server Configuration 

Receive Connector Server Configuration->Hub Transport->Receive Connectors Pane->Properties of Default

Here you can adjust your receive connectors default maximum message sizes. After the settings have been changed you will want to either restart your server or reload all exchange services (which ever is easier for you).

Kaseya Agent Procedure -> Alert if Privileged Account are changed in Active Directory

Out of the skunkworks here at Squidworks comes a new Kaseya Agent Procedure. This procedure (Script) pulls all members of privileged accounts groups like Domain Admins, Enterprise Admins and Schema Admins and stores it to the GETFILE location on your K-Server. Also viewable using LiveConnect -> Agent Data -> GetFile Tab.  You can add and remove groups from the VBScript to match your needs. The nice thing about this script is it finds out what your Forest is and queries the domains inside. You do not need to edit script for every domain in your customer base. This 1 script will query any domain it is pointed at, with out knowing what the domain name is! (Sweet) This makes it a great tool to deploy across all customers as it requires no edits to run on any domain.

The script should be scheduled to run every day, each time it is run it copies a new file up to the GETFILE area and does a compare of the 2 files. If they are not exactly the same it will send an alert that a change has happened.

You then need to watch for this alert to happen and alarm on it. To do this you will goto your Monitor tab in Kaseya. In the main menu under Agent Monitoring select Alerts. In the main window under alerts you will find a drop down selection box called “Select Alert Function“. In this drop down list locate and select “Get Files” then select the AD server you are running the script on and set it to Alarm and email you upon change.

That’s It. It will check your accounts and if a change takes place it then alerts you that a change has happened to which you can investigate. This works great if you need to keep people out of these privileged accounts groups. 

AD Admin Audit Kaseya Script Zip

Enjoy

Cubert

Recursive Access Control Lists with Max Depth

Here is a Visual Basics script I put together which will list all of the Access Control Lists (ACL’s) for all folders in a particular directory.

It allows you to specify a start point and a max depth to recurse.

I needed this so that I could generate a report listing the ACLS’s for various shares. It uses the CACLS executable and as long as you have access to the shares it should run without issue. (However, as with anything Microsoft, I make no guarantees that it will function properly on your system). I tried to account for various idiosyncrasies’ in the way windows operates but if you find a bug, let us know and we will try to correct it.

Download -> ACL List script

How to launch control panel items or objects from a RUN or CMD line.

Sometimes it is just simpler to run from CMD line control panel objects. It is even easier to get a user who does not have the menu items available to hand them a “RUN” CMD to open the correct control panel object you need them to. Below is a list of all the control panel objects just type the CMD in the RUN or DOS windows and you place a user right where you need them.

Accessibility Options
 access.cpl

Add/Remove Programs
 appwiz.cpl

Add Hardware Wizard
 hdwwiz.cpl

Automatic Updates
 wuaucpl.cpl
 
Bluetooth Properties
 bthprops.cpl
 
Display Properties
 desk.cpl
 
Firewall Properties
 firewall.cpl
 
Game Controllers
 joy.cpl
 
Internet Options
 inetcpl.cpl

iSCSI Initiator
 iscsicpl.cpl
 
Java Control Panel
 jpicpl32.cpl
  
Licensing Mode
 liccpa.cpl
 
Mouse Properties
 main.cpl
 
Network Connections
 ncpa.cpl

Network Setup Wizard
 netsetup.cpl
 
ODBC Properties
 odbccp32.cpl
 
Power Options
 powercfg.cpl
 
Regional and Language Options
 intl.cpl
 
Sound and Audio Devices
 mmsys.cpl

Stored Passwords
 keymgr.cpl

System Properties
 sysdm.cpl
 
Telephone and Modem Properties
 telephon.cpl

Time and Date Settings
 timedate.cpl
 
User Accounts
nusrmgr.cpl
 
Windows Security Center
 wscui.cpl

Wireless Link
 irprops.cpl

 

This works on Windows XP, Windows Vista, Windows 7, Windows server 2003 a/ R2 and Windows Server 2008 / R2

Repair and Reset TCP/IP Winsock Catalog Corruption in Windows Vista or Windows 7

Winsock 2 accommodates layered protocols. A layered protocol is one that implements only higher level communications functions, while relying on an underlying transport stack for the actual exchange of data with a remote endpoint. LSP  aka Layered Service Provider can be a security layer that adds protocol to the connection establishment process. An example of an LSP is the Microsoft Firewall Client Service Provider installed as part of the Internet Secutity and Authentication Server (ISA) on clients. The Microsoft Firewall Client Service Provider installs over the Winsock base providers for TCP and UDP.

To check which LSPs installed on your Windows Vista or Windows 7, use netsh winsock show catalog command.

Sometimes the winsock settings in Windows may get corrupted, causing errors and problems with Internet connectivity. When Winsock corrupts, the networking errors that you may face include unable to access network services, web pages, Windows update services or other odd network behaviors.

Now to reset Winsock we can use a similar cmd “netsh winsock reset”. 
What netsh winsock reset command does is it resets Winsock Catalog to a clean state or default configuration. It will remove anyWinsock LSP (Layered Service Providers) previously installed, including any potentially malfunctioning LSP that may cause the loss of network packets or transmission failures. So any previously installed LSPmust be reinstalled. This command does not affect Winsock Name Space Providers.

To repair and reset the Windows Vista or Windows 7

  1. Click on Start button.
  2. Type Cmd in the Start Search text box.
  3. Press Ctrl-Shift-Enter keyboard shortcut to run Command Prompt as Administrator. Allow elevation request.
  4. Type netsh winsock reset in the Command Prompt shell, and then press the Enter key.
  5. Restart the computer.

Good luck,

Cubert

The User Profile Service Service failed the logon. User profile cannot be loaded, when logging on to Windows 7 or Windows Vista

Ever get this when logging in to a Vista or Windows 7 system?  I seem to get it all the time, here is how to quickly fix it. By the way that is not a typo in my subjectline but how the error shows up when you try logging in. Not sure why but I am guessing that “User Profile Service is a Service and thus the “User Profile Service Service”  as the title of this post.

Log in with a admin account and run regedit. Go to the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

You will find a key or maybe several keys that have “.bak” extenion on them. You will also find the same key with out the “.bak“, Rename the key without  the  “.bak”  to same name + “.new” then rename the Key with “.bak” removing the “.bak“.  Basically we are making the .bak key the original key and so forth.


Now that you have that done we need to edit 2 keys inside of the newly renamed key.  Choose the folder without .bak, in the right pane, double click RefCount and type 0 and then click OK, next choose the folder without .bak, in the right pane, double click State and type 0 and then click OK.

Close the regedit and logout and back in as the user profile that was failing. It should allow you in now.

I hope this helps someone out there

Cubert