Looking for multimedia files [list of common multimedia files] -> solution? powershell!

Sometimes as system administrator, you find your file servers are cluttered with stuff you may want to decide to do something about, say, export to the final bin. However the case, you want to know what’s there. [and it is usually big stuff]. On windows you can ofcourse check manually, or make a list based on file extension. That’s simply how it works. It took some sites to google, but there is an abundance of file extensions out there. Most of them aren’t used, but this is a list that may be found common for multimedia files: list-mmfiles

I’m going to use this to list all multimedia files on the network now, when I miss files (by manual checking), i’ll update the list in this post.

Oh well, I skipped that, I just did :

Get-Childitem X:\ -Recurse -ErrorAction SilentlyContinue | Export-csv
-Path C:\all.csv -Encoding ascii

To get all files on the system, and sort it out later, using Excel.
You can then sort on file extension.. pff, sjah.. tssss. No file size info..

I quickly looked up through the file types that were actually on the file system and ran a script that adds up all the file sizes (it does this from the path you’re in):

$totalfs = 0
$files = Get-ChildItem -Recurse -Include *3gp,*asf,*avi,*bmp,*cda,*gif,*jpg,*m1v,*m4a,*m4v,*mov,*mp3,*mp4,*mpe,*mpg,*pcx,*png,*wma,*wmf,*wmv,*wmz
$totalfs = ($files | Measure-Object -Sum Length).Sum / 1GB
"{0:N0}" -f $totalfs

Update: Oh and by the way, this should also list the amount of files.
(I needed that to list all txt files, actually: cookies)

$totalfs = 0
$totalfsc = 0
$files = Get-ChildItem -Recurse -Include *txt
$totalfs = ($files | Measure-Object -Sum Length).Sum / 1GB
$totalfsc  = ($files | Measure-Object -Sum Length).Count
"{0:N0}" -f $totalfs
"{0:N0}" -f $totalfsc
Posted in News | Comments Off on Looking for multimedia files [list of common multimedia files] -> solution? powershell!

Nagios 3.4.1 Columns in status.cgi

That wasn’t nice.

Nagios has 3 columns as a default hard coded inside its status.cgi.
Today we have such wide screens to display things with…

In order to change this default behaviour of old code, in nagios, change the following:

(get a copy of the nagios source code, in my case 3.4.1)
unpack, ./configure it
in /yoursourcedir/nagios/cgi/ change status.c
int overview_columns = 3; into int overview_columns = 10;

then compile with:

make cgis

then you can copy the newly created cgi in place of the old one (for example.)

Be aware that you set the rights correctly.

Hope this helps you.

Posted in News | Comments Off on Nagios 3.4.1 Columns in status.cgi

LDAP Configuration for HP Printers and Active Directory

I had to figure out how to configure LDAP on these HP Color LaserJet Pro MFP M476 series with LDAP support.
The LDAP configuration was a tad bit different than I suspected.

For some reason the SSL function didn’t work, so I switched to normal, old-fashioned way of doing this on port 389.

LDAP Server: Fill in your Windows Domain Name.Extension
Server port: 389

verification: Simple

And here we go, username must be specified, not as username, but as user DN. so:

Username: cn=username,OU=Users, DC=Domain,DC=DomainExtension

The search path should be something like:
Path OU=Users,DC=DOMAIN,DC=DomainExtension
Match cn
e-mail mail

Note that you don’t use spaces in LDAP queries.

Now you can test your configuration.
Fill in some account that you know exists in your directory and hit the Test button.

Should work now.
Hope this helps you.

Posted in ldap, News | Comments Off on LDAP Configuration for HP Printers and Active Directory

Fortigate SSL Login

To log in to a fortigate gui over http-SSL they moved the port from




Coz 443 is used so much (seriously?)

It is: https://x.x.x.x:10443

This will help you to get this:





Posted in Configuration, Fortigate | Tagged | Comments Off on Fortigate SSL Login

Linux distribution focused on audio

I’m currently trying out AVlinux to have some bits going with sound and audio.
Not necessarily “music”, whatever people think it is.

If this doesn’t work out well next on the list are:

Ubuntu Studio

You got something better? let me know at the regular e-mail address @ this website

Posted in News, sound | Comments Off on Linux distribution focused on audio

Ubuntu 14.04 turn off virbr0

You installed virtualisation software during installation, and now your installation comes with a virbr0 in your interface list. You don’t want that. Remove it!

Yo, Ubuntu turn off that vir, bro!

> brctl delbr virbr0
bridge virbr0 is still up; can't delete it
> virsh net-destroy default
Network default destroyed
> virsh net-undefine default
Network default has been undefined
> service libvirtd restart
libvirtd: unrecognized service


> service --status-all


> service libvirt-bin restart
libvirt-bin stop/waiting
libvirt-bin start/running, process xxxx

You are happy again.

Posted in linux, News | Comments Off on Ubuntu 14.04 turn off virbr0

Post Holidays Syndrome

The holidays on Iceland this year in July were great.
Not too good weather-wise, but well, what do you expect from a country that begins with “Ice”.

I wished the weather would’ve been better for I would have made more timelapse films.
See this page for a few I did manage to make.

Posted in Holidays, News | Comments Off on Post Holidays Syndrome

Update on gps device

Working with radians today.
Small updates on the code for the gps device that I’m constructing.

Posted in avr, gps, Hardware, News, Programming | Comments Off on Update on gps device

OWA: Blocking Microsoft Internet Explorer

Internet explorer has a leak, and now you don’t trust it for people to logon to your OWA. (Outlook Web Access).
You may want to block OWA to be used with Internet Explorer.

To achieve this, I did the following:

I changed logon.aspx in the ClientAccess\Owa\auth diretory on the OWA server. I added these 5 lines as the first 5 lines of the logon.aspx page.

<script language="JavaScript" type="text/JavaScript">

if (navigator.appName == "Microsoft Internet Explorer") { 
  document.location = "https://webmail.yourdomain.com/owa/auth/ie_reject.aspx"; 


Basically, this points any browser that advertises itself as Microsoft Internet Explorer to the page: ie_reject.aspx (in the same directory ‘auth’ ).

This page has a picture on it called iewarning.jpg, that you also place in the same directory ‘auth’.

The page contains code that looks like this: ie_reject.aspx

The iewarning.jpg looked something like this.



People are given the chance to click the links and download and install a safer browser, while giving a feel of what used to be the normal OWA page.

For the looks I just slapped in the logo and text as an image for mozilla and chrome:

Hope this helps you.


IE 11 didn’t get detected, Microsoft has changed user agent string in IE11, so you should use the following javascript code instead:

( so, forget those 5 lines as the first 5 lines in logon.aspx, but put this on top there instead. )

<script type="text/JavaScript" language="JavaScript">
function getInternetExplorerVersion()
  var rv = -1;
  if (navigator.appName == 'Microsoft Internet Explorer')
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  else if (navigator.appName == 'Netscape')
    var ua = navigator.userAgent;
    var re  = new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  return rv;
if (getInternetExplorerVersion() != -1) { document.location = "https://webmail.domain.com/owa/auth/ie_reject.aspx"; };
Posted in News, Windows | Comments Off on OWA: Blocking Microsoft Internet Explorer

Ricoh and LDAP with Active Directory

Ricoh Multifunctionals working with LDAP to an Active Directory are fun!

When it works.

I ran into a problem with Ricoh Multifunctionals and the connection to an LDAP server.

If you do too at some point run into trouble setting up these printer-scanner-fax-whatnots, make sure you check the following:

– Set a DNS server, better, set two.

– Create a domain, first entry is the descriptive name of the setting, second the ip address of a DC, third, the name of your windows domain.

Not setting a DNS server makes the check on LDAP fail for some reason, even if you connect to an IP address!

Under water this is due to the use of just the function gethostbyname() with no checking if gethostbyaddr() could have been used as well. Lazy programming.

Specify your LDAP location (where to search) in your Active Directory such that it looks like the following:


Don’t use “-marks.
Don’t use spaces.

Lastly, you may want to change the search setting ID from cn into displayName so it can look up names in the directory, it worked better in my case.

Something like this:



This should do. I hope that perhaps this helps you.

Posted in Configuration, ldap, News | Comments Off on Ricoh and LDAP with Active Directory