Wednesday, January 21, 2015

System.Runtime.InteropServices.COMException error 0x80005000 working with DirectoryServices and LDAP path

I ran into this issue in VB.NET code used to remove an ADS user from certain groups.  One of the groups distinguishedName contained a '/' in the name (path). 

For example LDAP://CN=HRUser,OU=H/R,DC=fabrikam,DC=com where the DN CN=HRUser,OU=H/R,DC=fabrikam,DC=com contains the forward slash (OU=H/R).  This triggered a System.Runtime.InteropServices.COMException error 0x80005000 when executing the DirectoryEntry Remove method. 

To resolve this, use an escape character in the DN.  So once I had obtained the DN as a string, I then used strGroupDN = Replace(strGroupDN, "/", "\/") to get the escape '\' in before the '/'.  This resolved the error.

Tuesday, January 20, 2015

proftpd 1.3.4 running on Drobo 5N cannot load admin page (php)

Note: I advise Googling about the information I discuss here.  Make note of each change you make, be able to undo what you have done if needed.  Even though what I have posted worked for me, I don't want to cause anyone to make changes that they may not know how to undo.  Worst case scenario, your can remove the installed apps and reinstall.

Tools used: Putty for SSH connection to Drobo, and WinSCP for data transfers on Drobo.  To bypass permissions issues, you can log in as root (Drobo's default password for root is root).  Always be careful using root.  And do not do anything that would expose root access outside your home network.

I used the installers and instructions from here:
https://sites.google.com/a/droboports.com/www/

to setup proftpd on my Drobo 5N.  I wanted to make a few notes that others might find helpful.

The compiled version of Proftpd available at the link above is setup to work with lighttpd.  Once I had everything installed and configured, the http:///proftpd/index.php page would not load (Error 500).

I found that the problem was in the lighttpd/etc/conf-enabled/cgi.conf file.  In that file the path assigned for php is incorrect if you installed php5 from the droboports site.  Edit this file and change:

".php" => "/mnt/DroboFS/Shares/DroboApps/php/bin/php-cgi" )

to

".php" => "/mnt/DroboFS/Shares/DroboApps/php5/bin/php-cgi" )

Save the file.  Change directory to the lighttpd directory and run service.sh restart.  After that, the proftpd admin page should load.

 

In setting this up there were a few other changes I need to make originally that I would like to mention.


The proftpd/etc/proftpd.conf file needed some changes


1) DefaultRoot - you may want to change this value.  This will be the location users land on when connecting to the ftp server.  On the Drobo the default will expose all of your shares.  You can change it to a single share by adding that to the end of the path. 
Ex: /mnt/DroboFS/Shares/FTP/  (assuming you setup an FTP share on your Drobo).  This will keep your FTP users from seeing things maybe you do not want them to see.

2) MasqueradeAddress
Add this line:  MasqueradeAddress  YourFQDNorYourPublicIP
Ex: MasqueradeAddress  my.home.com

3) Specify a passive ports range unless you want to forward a ton of ports on your router:
PassivePorts 10100 10500


That is the value I am using.  I do not have many clients so I did not use a lot of ports.  Then on my NAT router, I did a port forwarding rule for that port range to the IP of my Drobo.


4) Enabling secured connections - You can enable TLS.  Near the bottom of the conf file you will see this section.  Mine is modified to enable TLS.


TLSEngine on

TLSLog /mnt/DroboFS/Shares/DroboApps/proftpd/var/log/tls.log

TLSProtocol TLSv1

TLSRequired on

TLSRSACertificateFile /mnt/DroboFS/Shares/DroboApps/proftpd/etc/server.crt

TLSRSACertificateKeyFile /mnt/DroboFS/Shares/DroboApps/proftpd/etc/server.key

TLSVerifyClient off



If you want to use client verification please research how it works and how to use it or else it will prevent connections.

In the FTP client software choose FTP protocol and choose TLS Explicit encryption.  The setting I use should encrypt both the authentication channel and the data channel.

5) Unable to locate host - An issue many people have is proftpd not knowing how to locate itself.  You may see references to 'edit the etc/hosts file and add your ip and name'.  What is not always obvious is where this is located.  It is at the root of the Drobo.  So go all the way to the root and then cd /etc.  An easy way to add your info to the hosts file is run the command: echo "  " > hosts
So like this: echo "192.168.1.10  mydrobo" > hosts
This should add an entry for your drobo in the hosts file.
On your home network you should be able to bring up the proftpd admin page by using your drobo name: http://

Troubleshooting
Don't forget to check your logs if troubleshooting.  For proftpd these are located at /mnt/DroboFS/Shares/DroboApps/proftpd/var/log

Stopping, Starting, Restarting, and Status
For all three components, lighttpd, proftpd, and php5, to start, stop, restart and get status you can do this from an ssh connection.  At each apps root under DroboApps there is a service.sh file.  Use:
service.sh start - to start
service.sh stop - to stop
service.sh restart - to stop and then start
service.sh status - to see if the app is enabled and running.

Please use the above at your own discretion.  Also you will want to be acting as root on your drobo due to permissions.

The above is a summary of what I had to do to get things working in my environment.


Tuesday, August 26, 2014

Msvcp90.dll is missing error

At my work I have experienced this error on various machines, and it can be very frustrating.  We have programs that run at logon that fail to run due to this error.


With some testing I found that this error only occurs if our Antivirus software is installed (Symantec Endpoint Protection).  If I uninstall Symantec, reboot the computer, our startup programs execute fine and no msvcp90.dll error appears.


Googling for help on this has been no help.  Most sites suggest that the file is missing, corrupt, you have a virus, a hardware malfunction, etc.  That is not the case in my experience.  It seems to be more of an interference created by another software, always antivirus software in my experience.  It is possible that my solution is not for you, and you do have file corruption, or maybe you do not have the C++ runtime installed, or installed correctly.  The problem I am describing usually appears on a computer that was functioning normally and that after software installation, this error appears.


I have finally found some fixes/workarounds for this problem. If you are experiencing the problem in a manner similar to what I have described you can try these troubleshooting steps yourself.  I cannot guarantee this solution will work for you, but if your symptoms match mine, it very well may work.


Fix Procedure 1
  1. Be logged onto your computer as an Administrator.  Many of you will have systems that use 'User Account Control'.  This is the prompt you have to agree to every time you try to do something that requires admin.  If that is the case, make sure you always start the programs I say to use by right clicking the program and choosing 'Run as Administrator'. This is a very important step to remember.
  2. Open a command prompt.  I suggest going to Start>All Programs>Accessories>right click on Command Prompt and choose 'Run as Administrator'
  3. At the prompt type: wbemtest and hit Enter key.
  4. The Windows Management Instrumentation Tester window will appear.
  5. Click Connect button
  6. In the Namespace box replace 'root\cmv2' with 'root\securitycenter' and click the Connect button.
  7. Click the Enum Classes button, leave the 'Enter a superclass name' box empty and click OK.
  8. On the Query Result screen, highlight AntivirusProduct and click the Delete button.
  9. Close the Query window and exit wbemtest
  10. Uninstall your antivirus software, reboot, and reinstall your antivirus software
Fix Procedure 2
  1. Place these three files (download is a .zip) in the same folder as the .exe that is throwing the error message. Click the link to download a .zip containing the three files.  Extract them.  Copy and paste the into the directory of the program's exe.
Possible Fix 3
  1. I am unable to test this right now but this might work. On a 32-bit OS, download this zip, extract the files, and copy/paste them into the C:\Windows\System32 folder.  On a 64-bit OS you may need to paste them both in C:\Windows\System32 and C:\Windows\SysWOW64 folders. 
A great way to observe this issue is use Procmon by Sysinternals.  Run Procmon, and then run the program that causes the error.  Once the error has appeared, stop Procmon.  Now filter on the process name.  You can see in the output where the process is trying to locate the .dll.  After employing one of the workarounds above, you can re-run the Procmon test and see how the program finds the .dll.

Hopefully, you no longer have the Msvcp90.dll error is missing issue.



Thursday, December 12, 2013

Real Time GPS Tracker SMS Commands

This is a quick reminder of the SMS commands for Real Time GPS Tracker.
rttstartpwd=userpassword
rttstoppwd=userpassword
rtttrackoncepwd=userpassword
rttstartgpspwd=userpassword

where userpassword is the configured SMS password of the remote user you are sending commands to.

Wednesday, September 04, 2013

Zoom 5341J cable modem - how to access event log

I have a Zoom 5341J.  I believe these particular URLs are only valid with this model.

For the Zoom 5341G or 5341H try 192.168.100.1/rf_index.asp (I'm not sure what information is available on that page).

Zoom 5341J
To log into the Zoom 5341J modem and see information use the URL:
http://192.168.100.1

You should then be prompted to log in.
Enter your credentials if you set them otherwise the defaults are username: admin and password: password

Once logged in you should be at a page addressed like this:
http://192.168.100.1/RgConnect.asp

Now put this URL in your browser's address bar and hit enter:
http://192.168.100.1/RgEventLog.asp

I've had it take me back to the login screen and then the RgConnect.asp page before.  I just put the URL for RgEventLog.asp in again and it will work.

You should then be able to see logging information.  It should look something like this:














DOCSIS 3
If you are reading this because you are troubleshooting an issue with your DOCSIS 3 modem
these links may help (thank you to the The Volpe Firm blog):
DOCSIS Basics Tutorial Series

here's another example of information on this site Timeout Descriptions (T1,T2,T3,T4)

Cable Modem Status Information
See what Downstream SNR, Downstream Power, Upstream SNR, Upstream Power are, and their recommended levels, here:
Cable modem signal levels (speedguide.net)

Friday, July 12, 2013

Tool for File and Folder Deleting including Recursive Deletions

This tool needs to be run as administrator.  That means right click the .exe and choose 'Run as Administrator'.

With this tool you can do things like specify a root directory and then use recursion to remove files that match an extension, a name, part of a name, or name and extension.  All file name matches are by the logic 'if the specified text is in the name'.  So if you put in 'far out' and you have a file called 'i'm far out' it will be deleted because 'far out' matched.

With folders, the names have to match exactly.  But nothing in this tool does case sensitive matching.  Everything, file and folder, does not use case when determining a match.  Again, with folders, the names have to match exactly for it to be deleted.  When the folder is deleted, and subfolder and files will also be deleted.

Deletions will go to the Recycle Bin.

There is a Test Run button to use to do a dry run of your setup.  The results window will tell you what happened but nothing will be deleted.  Use the test run to make sure your settings are correct before doing the real deletions.

I recommend you read the instructions linked below.  They are short.

The instructions for this tool are here.

Download is here.  Just extract the .exe somewhere and run the tool from there.

The tool looks like this:

Friday, June 28, 2013

New Media Notifier for Media Center and Media Browser

Disclaimer: If you do not want notification messages appearing while watching a movie or TV show, you do not want this tool.

Quick Guide (more details below)

Remember to run these tools as Administrator.  Right click the .exe and choose Run As Administrator unless you have disabled the UAC.

This tool allows one to receive new media notifications while using Media Center.  This tool utilizes the .xml file that are used in a Media Browser configuration.  To get a new movie notification, a movie.xml file will be read.

I wrote this tool for myself.  This application works best if you have an automated system, using tools like SickBeard, CouchPotato, or FileBot.  Or if you want your family downstairs to know that show they want to see is ready.

Requirements


Windows Media Center and .Net 3.5.


Install


This setup utilizes two tools.  One tool simplifies the install and setup of the required MCPopupSend program by Scott (link to his posting about the tool he made).  The second tool runs monitoring specified directories for new media items: movies, and TV shows to appear.

  1. Once each Media Center that you want to show a brief popup message when new media is available, please run the MCPopupEasy tool.
  2. Download the tool, extract the .zip file, and run the .exe inside.  Click the button to install MCPopupSend (you must do this to get messages).  Next, click the button to add the necessary firewall exceptions (you must do this too).  The firewall rules created are set to only be open on the local subnet (all you should need).
  3. The Media Center is now ready to receive broadcast messages and display popup notifications informing of new media
  4. Next, go to the computer that will be used to monitor folders for new content.
  5. Download this NewMediaNotifier tool.
  6. Extract it somewhere.  The program is going to be running all the time from this folder, so put it somewhere it can stay.
  7. Run the NewMediaNotifier.exe
  8. In the Movie Folder section, add the root directories of your movie folders.
  9. In the TV folders, add the root directories of you TV show folders.
  10. Set the amount of time for the message to show when it appears on the Media Center.  The default is 5 seconds.
  11. Choose whether the program should automatically start monitoring when it opens.
  12. Choose whether to have the application open as a small icon in the systray (area down by the clock).
  13. Specify what you want the title of each type of message to be (if you don't like my defaults).
  14. Choose the type of title to show from the xml file for movies, and select whether you also want to see year, rating, or runtime (or all).
  15. Click Start.  Now when new media is written to the monitored locations, the program will wait 20 seconds (to be safe the xml file is no longer being written to) and will broadcast a message to the Media Centers informing of the new content available.
I cannot control anything about the popup except the text.  I cannot remove the OK button, I cannot change color, shape, or transparency.  I also cannot stop the Media Center ding.

I know many of you would not want a message popping up while watching a movie.  Like I said, I wrote this for our home use.  I'm just offering it up.  Our family does not find it un-appealing, and likes knowing when something new just got put up.


Further Information


MCPopup utilizes UDP port 11000 and a firewall program exception needs to be made for ehexthost.exe in the ehome directory.

If you are interested an utilizing the popup to send other kinds of messages you can.  Use the MCPopupEasy tool to prepare the Media Centers.  Then use the MCPopupSend.exe to send whatever messages you want.  Read the post linked about for Scott's description and the command line options.

If you do not want the firewall exceptions, there is a button in the tool that will remove them. 

Do not remove the mcepopup directory from the directory with the executable.  The executable expects it to be there.

If you want the NewMediaNotifier tool running all the time, make a shortcut to it in the Startup folder.

On Vista and Windows 7 put the shortcut here:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

On XP:
C:\Documents and Settings\All Users\Start Menu\Programs

Check the two boxes and do the above, and the tool will always run and sit down in the systray, out of the way.

This is what the popup looks like:












It is not actually that big.  I cropped the image.  That is only part of my screen.


Screenshots



MCPopupEasy














NewMediaNotifier













Troubleshooting


If you get an error immediately after opening, you may not have .Net 3.5 installed

If you do not run the programs 'As Administrator' don't expect them to work.

Issues or questions please post in the comments section.

New beginner's guide to PowerShell on my GitHub page

 I created a beginner's guide to PowerShell here: https://github.com/aamjohns/Powershell_Guide/blob/main/README.md I hope it helps someo...