When setting up a new database connection for a web front end or other connection, I will use the command line to generate a random password. Since these are machine read and used passwords, there is no excuse to use a short password.

The following are my two preferred ways to generate a random password from the BASH shell. Please note that these generators will filter out some the less desirable characters like ‘, “, etc. which can often cause problems with configuration files:

< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32}; echo;

The echo at the end just pushes the shell prompt to the next line. You can change the -32 to whatever length you want.

Optionally, you can use SHA to hash the date and base64 encode it.

date +%s | sha256sum | base64 | head -c 32 ; echo

For more ideas and ways to generate random passwords, visit the following site: 10 Ways to Generate a Random Password from the Command Line.

I’ve published my Active Directory authentication (AuthN) and authorization (AuthZ) module for node.js. This module supports large active directory installation where over 1000 entries may be returned from a query via range specifiers. In addition, the module will recursively enumerate and expand all nested users and groups.

You can view or checkout the code online on my github account:

Installation is easy with npm:

npm install activedirectory

Usage is pretty simple:

var ad = new ActiveDirectory('ldap://yourdomain.com', 'dc=yourdomain,dc=com', 'authuser@domain.com', 'authpassword');
var username = 'bob@domain.com';
ad.findUser(username, function(err, user) {
  if (err) {
    console.log('ERROR: ' +JSON.stringify(err));

  if (! user) console.log('User: ' + username + ' not found.');
  else console.log(JSON.stringify(user));

Hope you find it useful!

ntop_logo The NTOP faq contains snippets of code about how to proxy the NTOP http server through Apache for improved security. However, with new updates to the program the image iFrames are incorrectly posting the following javascript:

<script type="test/javascript">

The correct output should be:

<script type="test/javascript">

Using the mod_proxy_html module we can modify the pages using the following:

ProxyHTMLURLMap  /ntop//ntop/      //

The full NTOP proxy configuration is as follows:

<IfModule mod_proxy_http.c>
        ProxyHTMLLogVerbose On
        LogLevel warn
        ProxyHTMLExtended On

        ProxyRequests Off
        <Proxy *>
                Order deny,allow
                Allow from all

        ProxyPass /ntop/  http://localhost:3000/
        ProxyPassReverse /ntop/  http://localhost:3000/

        <Location /ntop/>
                SetOutputFilter  proxy-html
                ProxyHTMLURLMap  /      /ntop/
                ProxyHTMLURLMap  /ntop//ntop/      //
                ProxyHTMLURLMap /ntop/plugins/ntop/ /ntop/plugins/
                RequestHeader    unset  Accept-Encoding

Epson Perfection 1240U PhotoEpson doesn’t provide x64 drivers for their older scanners. However, the smart folks over at PlanetAMD64 have used the Epson Perfection 2400 Vista x64 drivers with success.

  1. Go download the Vista x64 drivers from Epson’s website.
  2. Extract the files to a folder.
  3. Open the es27.inf file in a text editor
  4. Locate the following line:
    %ES27.DeviceDesc% = USB.ES27XP.x64, USB\VID_04B8&amp;PID_011B

    Change it to the following:

    %ES27.DeviceDesc% = USB.ES27XP.x64, USB\VID_04B8&amp;PID_011B<span style="color: #993300;">, USB\VID_04B8&amp;PID_010B, USB\VID_04B8&amp;PID_010B\5&amp;36C701F9&amp;0&amp;2</span>
  5. Install the driver…
  6. When prompted about the driver being unsigned, click on continue anyway.

That worked for me.