Monday, June 22, 2015

Accessing password for D-Link provided by TM Unifi

As a note, if the admin password is lost or forgotten, there is a way to access the admin console for the D-Link routers (DIR-615) before 2015.

Some people say, better to just don't share it but, some may say that its public knowledge anyways.

Method 1: Brute force attack. Or in layman term, guess the admin password (Its either empty or admin).
Method 2: Use a feature within the router. Not sure if newer routers have the same feature. See below;

Step 1

Connect a PC to the router (LAN or wireless) and open a web browser URL at
192.168.0.1

This should show the admin page of the router.

Step 2

Change the URL to
192.168.0.1/model/__show_info.php?REQUIRE_FILE=/var/etc/httpasswd

It will display the login password for admin.


Kid: OMG...you mean I can change the password as much as I like but anyone can view the password?
Tech support: Err... yeah.
Kid: Time to change the router?
Tech support: You could. We can arrange for the technician to come over.

Update:
TM unifi has updated their routers remotely. Please check, if you see your password displayed, contact them for a fix.

Saturday, June 20, 2015

Raspberry Pi: Getting Started with OSMC

After getting the Raspberry Pi 2 (RPI), NOOB SDcard from Element14 started up without a network cable. Only 3 option for the OS is shown as it boot from the NOOB SDcard (yes, it has to be plugged in)

Plugged in the networking cable and restarted RPI. This time, it loaded the remaider of the OS like OSMC and OpenElect.

OSMC (Open source Media Center), is a Debian based Linux operating system. Fomerly known as Raspbmc.  OSMC features an application store for TV use. Kodi is an application included for handling multimedia locally or online on OSMC.

Kodi or formerly known as XBMC, is an open source software (GPL) for handling of videos, music and pictures. Live TV can be viewed via Kodi and its add-ons expand its use. The support of UPnP allows streaming of Kodi to any other Kodi instances. Its like multi screen mirror display.

Here are steps to start off with the OSMC operating system.

Step 1: Boot to OSMC

Boot up the RPI. It goes into the RPI boot screen, press the "SHIFT" key to bring up the editing screen. Click on OSMC for PI2 and press "Enter" and an "x" will appear for the OSMC.

Press "Esc" and it should start downloading OSMC and install. Once done, it reboots to OSMC.

Troubleshooting
After OSMC splash screen appeared, the Samsung TV displayed
"Mode not supported".

What does this mean? OSMC got the wrong resolution or the TV did not support multiple modes automatically.

Troubleshooting Step 1: 

In the same network, open the SSH client (Putty) and connect to the RPI via IP address.
username: osmc
password: osmc

At the command line type:

Identify which mode is being used that is causing the problem.
tvservice -s

Identify which modes are available in OSMC monitor service
tvservice -m DMT

Output that I got:

osmc@osmc:~$ tvservice -s
state 0x12001a [HDMI DMT (39) RGB full 16:9], 1360x768 @ 60.00Hz, progressive
osmc@osmc:~$ tvservice -m DMT
Group DMT has 4 modes:
           mode 4: 640x480 @ 60Hz 4:3, clock:25MHz progressive
           mode 9: 800x600 @ 60Hz 4:3, clock:40MHz progressive
           mode 16: 1024x768 @ 60Hz 4:3, clock:65MHz progressive
  (prefer) mode 39: 1360x768 @ 60Hz 16:9, clock:85MHz progressive

Troubleshooting Step 2:  

Reboot RPI, and as it loads press "SHIFT" until the edit boot screen appears. Click on OSMC and choose "Edit config".

Changed the value to match below. E.g. to use alternative mode, change hdmi_mode from 16 to 4.



Click"OK", and press "Esc". Reboot as normal.

Keep changing the value of the mode until it works and display Kodi with default OSMC skin/template.

Tuesday, June 16, 2015

Raspberry Pi: Getting Started

Where can I find a tiny little computer that can be programmed and cost under RM300? Lots of tablets floating around but I finally settled with just a bare computer, the Raspberry Pi 2.

What is this? 

Bare computer with NO monitor, keyboard or mouse.

What can be done with Raspberry Pi? Here is a short list;
Just release in 2015, here are the specs for Raspberry Pi 2.
  • SoC Broadcom BCM2836
  • CPU: Quad-core ARM Cortex-A7 (~6x performance)
  • GPU: Broadcom VideoCore IV
  • Memory: 1GB LPDDR2 SDRAM (2x memory)
  • Video outputs: HDMI and 4-pole 3.5 mm jack
  • Audio outputs: 4-pole 3.5 mm jack, HDMI
  • Onboard storage: microSD card slot
  • 10/100 Ethernet RJ45 onboard network
  • 5V micro USB power input jack
  • 40 pin 2.54mm header expansion slot (The layout)
  • 4 USB ports

How to get this done?

Read the Setting up instructions, and buy the components.
What I bought.


Try joining a Raspberry group like that in Googleplus.

To start off, an operating system needs to be selected from one of many;
  • Raspbian (Debian Wheezy port)
  • OpenElec
  • RISC OS
  • Arch Linux
  • OSMC (Replacing RaspBMC)
  • Pidora (Fedora Linux)
To be continued...



Thursday, June 4, 2015

Centos Linux Status Reporting with xsos

Centos linux status can be read from so many ways. Ryan Sawhill provides a nice layout of so many reporting formats in xsos. The source and documentation is fairly well prepared at https://github.com/ryran/xsos

Requirements: one of it is BASH 4

Step 1: Download xsos and make it executable. Use root access.

wget -O /usr/local/bin/xsos bit.ly/xsos-direct
chmod +x /usr/local/bin/xsosa

Step 2: Run xsos

Example of some of the reports;

1. Display the help commands
$ xsos -h

2. Display OS and memory information
$ xsos -om



3. Display CPU, LSPCI and Network devices
$ xsos -cln


4. Display sysctls info
$ xsos -sysctl

It is a really handy tool to prepare documentation and analyse status for troubleshooting.


Monday, April 20, 2015

Did you know there is a Windows Remix?

Just heard a pretty awesome tune but wait till you see the video.

How many of these screens have you seen?

Fake listings on Google Maps

Why would you want to create a fake listing on Google Map?

Nice write-up from Danny Sullivan of Search Engine Land on Bryan Seely who presented this weakness at TEDx Kirkland.

Advantages of being in the open source software is apparent here. If developers picked up on this, some form of followup or monitoring would have taken place.

Wednesday, April 15, 2015

Read DVD with Avidemux

Avidemux cannot directly open a DVD file. Instead a readable VOB file is needed to provide a format to access the DVD.

Operating system: MS Windows 7

Open a command prompt.

To create VOB for title 1, chapter 1, or in the DVD file its called VTS_01_0.vob, type

"E:\mplayer-svn-37386\mplayer.exe" dvd://1 -chapter 1 -dumpstream -dumpfile rippeddvd1_1.vob

To create VOB for title 2, or in the DVD file its called VTS_01_1.vob, type

"E:\mplayer-svn-37386\mplayer.exe" dvd://2 -dumpstream -dumpfile rippeddvd1_2.vob

To create VOB for chapter 2, or in the DVD file its called VTS_01_1.vob, type

"E:\mplayer-svn-37386\mplayer.exe" dvd://1 -chapter 2 -dumpstream -dumpfile rippeddvd1_2.vob

Alternatively if above still fails, use another application and convert the DVD to a readable format. E.g. Handbrake software.

Read www.avidemux.org for further details

Friday, March 20, 2015

PhpPgAdmin ERROR: column “spclocation” does not exist



The Installation of PostgreSQL and phpPgAdmin was great with the following;
phpPgAdmin 5.0.4-1.el6
Centos 6.3
PostgreSQL 9.4.1

Attempt to create a new database using phpPgAdmin, the following error appears
ERROR: column “spclocation” does not exist

Possible cause;
Using outdated phpPgAdmin
and
There is no definition of the column spclocation for PostgreSQL version 9.4.

Solution:

Step 1: Edit Connection.php

In Centos Linux, go to the folder /usr/share/phpPgAdmin/classes/database/ and notice that there are no Postgresql file for 9.4. Edit the file Connection.php. Add the case '9.4' line around line number 82, as shown below;

// Detect version and choose appropriate database driver
                switch (substr($version,0,3)) {
                        case '9.4': return 'Postgres94'; break;
                        case '8.4': return 'Postgres'; break;

Step 2: Edit files

Make a copy Postgres84.php file with the command below;
#cp Postgres84.php Postgres94.php

Open Postgres.php and copy the functions getTablespaces and getTablespace to the file Postgres94.php

Edit Postgres94.php;

Replace all references of version from 8.4 to 9.4. E.g.

Amend the 2 lines
$sql = "SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, spclocation,
to
$sql = "SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, pg_tablespace_location(oid) as spclocation,

and

$sql = "SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, spclocation,
to
$sql = "SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, pg_tablespace_location(oid) as spclocation,

Step 3: Create database

Open the web browser and access phpPgAdmin to create a new database.