0

Tips & Tricks : Apache2 autostart on openSUSE 13.1

-

In order to have Apache2 started automatically after reboot use:


systemctl enable apache2.service

0

How-To : Deploy VisualEditor extension for MediaWiki 1.24.2 on openSUSE 13.1 x64

-

In previous article I described how-to Deploy Parsoid on openSUSE 13.1 (which turns out to be quite a challenging task). Parsoid is component required for VisualEditor. Now it’s time for VisualEditor deployment.

Downloading VisualEditor

At the moment, when I’m doing deployment, stable version of MediaWiki is 1.24.2. VisualEditor is an extension written for certain version of MediaWiki, hence we can’t just download latest version and use it. It has to be specific release for specific MediaWiki version.

So, first we download VisualEditor for MediaWiki 1.24.2:

git clone -b REL1_24 https://github.com/wikimedia/mediawiki-extensions-VisualEditor.git
cd mediawiki-extensions-VisualEditor/
git submodule update --init

Once it’s done we need to place content of mediawiki-extensions-VisualEditor in extensions/VisualEditor folder under MediaWiki folder structure.

Finally, once we have all files in proper places it’s time to inform MediaWiki about VisualEditor.

Changes to LocalSettings.php

Changes which have to be applied to LocalSettings.php:

# VISUAL Editor
require_once("$IP/extensions/VisualEditor/VisualEditor.php");
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgHiddenPrefs[] = 'visualeditor-enable';
$wgVisualEditorParsoidURL = 'http://localhost:8000';
$wgVisualEditorParsoidPrefix = 'localhost';
Remember to adjust Parsoid URL and Prefix accordingly to setup of your Parsoid service.

From now on you can enjoy VisualEditor until you decide to upgrade to newer version of MediaWiki.
Prior to that I would suggest to check if there is VisualEditor available for new release and test it prior to live deployments.

0

Tips & Tricks : Configure Apache on Debian 7 for RT4

-

Once Request Tracker 4 is installed on Debian 7, there is one more thing to do.

Small change in Apache configuration to make RT4 website to work.

First edit Apache configuration file:

root@hostname:~# vi /etc/apache2/sites-available/default

Then add to that file (at the end):

Include /etc/request-tracker4/apache2-modperl2.conf
RedirectMatch ^/$ /rt
</VirtualHost>
0

Code snippets : Mass file rename in Powershell

-

If you want to replace string in multiple files name you can simply use PowerShell for that.

Dir -Recurse | Rename-Item -NewName { $_.name -replace "file","name-of-file" }
0

Tips & Tricks : Fixing TMG 2010 and IE 9 issue

-

When you install TMG 2010 on Windows Server with IE9 you might find that TMG console will not work.

That is caused by IE 9. In order to fix it follow steps:

  1. Open “C:\Program Files\Microsoft Forefront Threat Management Gateway\UI_HTMLs\TabsHandler\TabsHandler.htc”
  2. Search for the 3 lines which contain “paddingTop“, and remark-out each of them by adding “//” in the begining.
  3. Save the file, and re-open TMG management console.

 

Example: Change the line:

m_aPages [niPage].m_tdMain.style.paddingTop = ((m_nBoostUp < 0) ? -m_nBoostUp : 0) ;

into:

// m_aPages [niPage].m_tdMain.style.paddingTop = ((m_nBoostUp < 0) ? -m_nBoostUp : 0) ;

 

0

TIps & Tricks : Searching for packages in Debian

-

If you want to install some packages on Debian and don’t know names of packages you can search in packages cache.

For example if you want to see all packages related to MySQL:

root@hostname:~# apt-cache search mysql
akonadi-backend-mysql - MySQL storage backend for Akonadi
ampache-themes - Themes for Ampache
aolserver4-nsmysql - AOLserver 4 module: module for accessing MySQL databases
libapq3.2.0 - Pluggable Ada 95 Binding to various database systems (library)
libapq3.2.0-dbg - Pluggable Ada 95 Binding to various database systems (debug)
libapq3.2.0-dev - Pluggable Ada 95 Binding to various database systems (development)
libaprutil1-dbd-mysql - Apache Portable Runtime Utility Library - MySQL Driver
asterisk-mysql - MySQL database protocol support for the Asterisk PBX
audiolink - makes managing and searching for music easier
auth2db - Powerful and eye-candy IDS logger, log viewer and alert generator
auth2db-common - Common configuration files for Auth2db backend and web frontend
auth2db-filters - Auth2db defaults filters pack
auth2db-frontend - Web frontend view for auth2DB log engine
automysqlbackup - daily, weekly and monthly backup for your MySQL database
autopostgresqlbackup - Automated tool to make periodic backups of PostgreSQL databases
backup-manager - command-line backup tool
backupninja - lightweight, extensible meta-backup system
bacula-common-mysql - network backup service - MySQL common files
bacula-common-mysql-dbg - network backup service - MySQL common files (debugging)
bacula-director-mysql - network backup service - MySQL storage for Director
...
root@hostname:~#
0

How-To : Use Raspberry PI as Wireless Access Point

-

Here is how to turn Raspberry PI with Linksys WUSB100 v2.0 adapter and Raspbian into wireless access point. This might be handy for conference rooms where you have wired connection, but wireless signal is too low. Just quick setup on Raspberry, plugin the cable and you have wireless available.

Install required packages

apt-get install firmware-ralink wireless-tools hostapd bridge-utils

Modify /etc/network/interfaces to add bridge interface

auto lo br0

iface lo inet loopback
iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual

iface br0 inet dhcp
bridge_ports eth0 wlan0

Once network configuration is modified reboot Raspberry PI.

Create /etc/hostapd/hostapd.conf file to define access point configuration

interface=wlan0
driver=nl80211
bridge=br0
country_code=PL
ieee80211d=1
ssid=raspb3rry-wifi
hw_mode=g
channel=6
wme_enabled=0
macaddr_acl=0
auth_algs=1
wpa=2
wpa_passphrase=raspberry123
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

Add configuration information to /etc/default/hostapd

That will make hostapd daemon to start automatically each time Raspberry PI will bootup.

DAEMON_CONF=&quot;/etc/hostapd/hostapd.conf&quot;
0

Code snippets : Passing credentials to Get-WmiObject in PowerShell

-

If there is a need to pass specific credentials to Get-WmiObject in order to gather information from remote machine, here is how you can do it:

$LAdmin = "DOMAIN\Administrator"
$LPassword = ConvertTo-SecureString "Password!" -AsPlainText -Force
$Credentials = New-Object -Typename System.Management.Automation.PSCredential -ArgumentList $LAdmin, $LPassword

Once $Credentials object is created you can easily use it to gather information from remote PC:

Get-WmiObject -ComputerName $computername -Class Win32_VideoController -Namespace "root\cimv2" -Credential $Credentials
0

How-To : Automate application mapping using SCCM 2012 Powershell

-

During mass reainstallation/redeployment/migration of large number of PCs, always question about applications is raised.

How to deploy/deliver applications once all machines are resintalled?

If you have SCCM in the infrastructure, this might help a lot with automation. All you need is mapping between computer name and applications (to be more specific collection ids) and PowerShell console on SCCM server.

Then you just need to prepare input files for the script below and you can automate application deployment on mass scale.

(more…)

0

Apps : Cisco7PCF for Windows

-

Just released small app for Windows platform. This app allows to decrypt type 7 password from Cisco devices as well as passwords from Cisco VPN profiles (PCF files).

Password which can be recovered using this app:

  • wireless keys fro Cisco access points,
  • RADIUS/TACACS shared secrets
  • NTP authentication keys
  • Enable passwords (NOT enable secrets, which are stored using MD5)
  • enc_GroupPwd – VPN group password from PCF file
  • enc_UserPassword – VPN user password from PCF file

Application also allows to store password and/or send tchem via email after decryption.

You can find app in Windows Store:

Cisco Password Decryptor