Anti tracking / add site list.

Hi all.

Found this thread by dmt on PCLinuxOS.com forum:

Hi all

Just thought I would share this.

There is a site that keeps an extensive list of dodgy sites that track and place adds and whatever.

The url is http://someonewhocares.org/hosts/

The list is updated on a regular basis and you can download it as a text file to easily place within the /etc/hosts file.

cheers

Looks interesting so I have decided to share it here just in case…

Andy

Blocking Bots…

Hi all.

I have noticed some interesting entries in my logs. There were few bots that were visiting me once in a while. I want to block them off ;).

How would one do it? I googled it and found the .htaccess file the easiest way.

Basically You create a file in the main directory of Your website. Lets say for example /var/www/html/ called .htaccess with 644 root permissions.

Then You create a rule.

Deny from env=bad_bot

From now on – everything called bad_bot gets denied. How to mark bot as bad_bot?

BrowserMatchNoCase Morfeus bad_bot

This means: Read the Browser’s user agent and don’t try matching the case. If You find word Morfeus – its a bad_bot.

Voila. This should block them bots and make my server even more secured :).

[root@icsserver ~]# cat ./.htaccess
# http://www.thesitewizard.com/apache/block-bots-with-htaccess.shtml
# hope this will get rid of them b****** ;)!
BrowserMatchNoCase Morfeus bad_bot
BrowserMatchNoCase Strikes bad_bot
BrowserMatchNoCase Again bad_bot
#BrowserMatchNoCase compatible; MSIE 6.0; Windows 98 bad_bot
#BrowserMatchNoCase compatible; MSIE 4.01; Windows 95 bad_bot
BrowserMatchNoCase pozdrawia bad_bot
BrowserMatchNoCase dewelopera bad_bot
BrowserMatchNoCase http://help.goo.ne.jp/door/crawler.html bad_bot
BrowserMatchNoCase ichiro bad_bot
BrowserMatchNoCase Googlebot bad_bot
BrowserMatchNoCase N905i(c100;TB;W24H16) bad_bot
BrowserMatchNoCase Googlebot-Mobile/2.1 bad_bot
BrowserMatchNoCase DoCoMo/2.0 bad_bot
BrowserMatchNoCase http://www.google.com/bot.html bad_bot
BrowserMatchNoCase Yandex bad_bot
BrowserMatchNoCase YandexBot bad_bot
BrowserMatchNoCase http://yandex.com/bots bad_bot
#BrowserMatchNoCase SecurityHoleRobot bad_bot
#BrowserMatchNoCase SecurityHoleRobot bad_bot
#BrowserMatchNoCase SecurityHoleRobot bad_bot
#BrowserMatchNoCase SecurityHoleRobot bad_bot
#Order Deny,Allow
Deny from env=bad_bot
#Deny from 127.0.0.1
[root@icsserver ~]#

# in front of a line means it’s going to be ignored.

And few more details:

[root@icsserver ~]# ls -full ./.htaccess
-rw-r–r– 1 root root 1205 Apr 4 16:02 ./.htaccess
[root@icsserver ~]#

You can block / allow certain countries. You can also block certain IP addy’s / genuine browser agents.

Hope You will find it interesting / helpful.

Andy

Creating ISO image out of CD / DVD.

Hi all.

Sometime ago I have created a slideshow video from a wedding photos for a Friendly couple. I made DVD video with a nice background music out of it and gave it to Them as a anniversary gift. (I used xsane / Imagination / mencoder / avidemux-qt / devede / K3B to accomplish this – all are available in PCLinuxOS repositories – just in case You ask). I wanted to keep a backup of this DVD on my HDD in a ISO file format just in case They ask for a copy. How would I create ISO file from a CD / DVD media? Its VERY simple. Use dd command. This is how it’s done:

Assuming that:

A) Your system identifies CD / DVD drive as /dev/sr0
B) Your destination folder is based in Your home folder
C) File name You want to user is file.iso.

Open terminal and issue this command followed by [ENTER] key punch:

dd if=/dev/sr0 of=~/file.iso

Where:

if=/dev/sr0 – Read from /dev/sr0 (raw format)
of=~/file.iso – copy the media to a file-container file.iso located in my /home/user/ folder i.e. backup media to ISO image

Now You can for example:

A) Burn the iso to a CD / DVD to make extra copies (with K3B / Brasero / SimpleBurn etc…)
B) If it’s lets say Linux LiveCD You can use ISO to boot it in VirtualBox (also available in PCLinuxOS repositories…).
C) Do many other things with it.

Hope this helps.

Andy

fsck: fsck.ntfs: not found

Hi all.

I was trying to fix an NTFS partition on a USB disk for a Friend of mine. I don’t have Microsoft Windows installed on any of my machines SO I couldn’t use chkdsk command. No problem. I have a PCLinuxOS – one mean green heckuva machine ;)…

I remembered that the Old-Polack was recommending

fsck -f /dev/sdxy

command to be ran as root on unmounted partition when booted from LiveCD.

I won’t bother booting into the LiveCD as its not / or /home partition that I am trying to fix I thought. Ok so unmounted the drive using the KDE Device Notifier and I ran the command:

fsck -f /dev/sdb1

The outcome was not what I have expected it to be…

fsck from util-linux-ng 2.18
fsck: fsck.ntfs: not found
fsck: Error 2 while executing fsck.ntfs for /dev/sdb1

As it turns out – I am missing a package… but which one? Synaptic package manager showed no entries whatsoever. Rpmsearch was not very helpful either… So I searched and searched and after a while asked Cyryl for help. I was provided with almost instant solution :P.

Make sure You have this packages installed:

A) ntfs-3g
B) ntfs-config
C) ntfsprogs
D) testdisk

and then run this two commands as root:

ln -s /usr/bin/ntfsfix /usr/sbin/fsck.ntfs
ln -s /usr/bin/ntfsfix /usr/sbin/fsck.ntfs-3g

Now try rerunning the command but skip the -f parameter:

[root@wishmasbell andrzejl]# fsck /dev/sdb1
fsck from util-linux-ng 2.18
Mounting volume… OK
Processing of $MFT and $MFTMirr completed successfully.
NTFS volume version is 3.1.
NTFS partition /dev/sdb1 was processed successfully.
[root@wishmasbell andrzejl]#

I was not missing any packages. All I was missing were two symlinks. The HDD was fixed as far as I can tell.

Thanks again Cyryl.

Andy

SMPlayer seems crash happy? Causing problems? Reset the settings – it may help.

Hi Folks.

I had a problem with my fav media player – SMPlayer. All of the sudden it started crashing. Some videos were unplayable.

Here is how I fixed it. VIDEO.

If You change any other settings change them one at the time and try playing video / restarting SMPlayer. Takes a bit longer but its easier to find the option that’s causing the trouble on Your machine.

Hope this helps.

Andy

"What are You running PCLinuxOS on?"…

Hi folks – its a question I often hear from a newcomers…

Here it is:

My specs – last updated 7th May 2012.

1) I am running PCLinuxOS 2010 KDE4 on Acer Travelmate 2420

I am running PCLinuxOS 2010 KDE4 on Acer Travelmate 2420

CPU: Intel(R) Celeron(R) M processor 1500 MHz
RAM: 2 GB
SWAP: 2 GB
GPU: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
SND: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC’97 Audio Controller (rev 03)
3G: Huawei E160G modem
WIFI: 06:05.0 Network controller: Atheros Communications Inc. AR5008 Wireless Network Adapter (rev 01)
LAN: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
BTH: Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
SATA: 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller
HDD: Samsung HM160HC 160 GB
MSE: Silvercrest (Lidl) Wireless 8 buttons mouse
PRNT: Lexmark X2650 AIO Scanner / Printer / Copier

2) I am running PCLinuxOS 2010 KDE4 on Dell Latitude D600

I am running PCLinuxOS 2010 KDE4 on Dell Latitude D600

CPU: ‎Intel(R) Pentium(R) M processor 1300 MHz
RAM: 1 GB
SWAP: 512 MB
GPU: ATI Technologies Inc Radeon RV250 [Mobility FireGL 9000] (rev 01)
SND: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC’97 Audio Controller (rev 01)
WIFI: Atheros Communications Inc. AR2413 802.11bg NIC (rev 01)
LAN: Broadcom Corporation NetXtreme BCM5702X Gigabit Ethernet (rev 02)
BTH: Dell Computer Corp. BC02 Bluetooth Adapter
SATA: 82801DBM (ICH4-M) IDE Controller
HDD: ‎Samsung MP0402H ‎40 GB
MSE: Kensington USB ValuOptical Wired Mouse
PRNT: Hewlett Packard F2180 DeskJet AIO Scanner / Printer / Copier

3) I am running PCLinuxOS 2010 KDE4 MiniMe with LXDE desktop on top of it on IBM Thinkpad 600E

I am running PCLinuxOS 2010 KDE4 MiniMe with LXDE desktop on top of it on IBM Thinkpad 600E

CPU: Intel(R) Pentium(R) II processor 360 MHz
RAM: 440 MB
SWAP: 1 GB
GPU: Neomagic Corporation NM2200 [MagicGraph 256AV] (rev 12) (2 MB)
SND: Cirrus Logic CS 4610/11 [CrystalClear SoundFusion Audio Accelerator] (rev 01)
WIFI: Ralink Technology, Corp. RT2501USB Wireless Adapter
LAN: None
SATA: Intel Corporation 82371AB/EB/MB PIIX4 IDE
HDD: 40 GB
MSE: Silvercrest (Lidl) Wireless 8 buttons mouse

4) I am running PCLinuxOS 2010 MiniMe with LXDE desktop on top of it on FrankenPuter – my main server. No more… I had to move to another machine due to the cutbacks in budget and electricity saving policy at home… Machine is resting inside the wardrobe now. Maybe I will use it again one day…

I am running PCLinuxOS 2010 MiniMe with LXDE desktop on top of it on FrankenPuter - my main server.

CPU: Intel(R) Pentium(R) III Coppermine processor 700 MHz
SCR: HUGE (backside not display) and HEAVY Old Dell
RAM: 256 MB (THANKS DUDE!)
SWAP: 1 GB
GPU: nVidia Corporation NV5M64 [RIVA TNT2 Model 64/Model 64 Pro] (rev 15)
SND: None
GWIFI: None
LAN1: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
LAN2: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller
GSATA: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 10)
GHDD: Some 10 GB Oldie
GMSE: Some PS2 No-Name
GPRNT: None

5) I am running PCLinuxOS 2010 ZenMini with Gnome desktop on top of it on Dell Latitude 610C Motherboard died on me :(. I am giving up on resurrecting this machine…

I am running PCLinuxOS 2010 ZenMini with Gnome desktop on top of it on Dell Latitude 610C

CPU: Intel(R) Pentium(R) III Coppermine processor 1000 MHz
RAM: 1 GB
SWAP: 2 GB
GPU: 01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 LY
SND: 00:1f.5 Multimedia audio controller: Intel Corporation 82801CA/CAM AC’97 Audio Controller (rev 02)
WIFI: 02:03.0 Network controller: Atheros ath5 card
SATA: 00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 Controller (rev 02)
HDD: 60 GB
MSE: Touchpad or Canyon Micro USB Mouse

6) I am running PCLinuxOS 2010 KDE4 on Packard Bell Easynote W3301 Keeps freezing. CPU issues. I am giving up on resurrecting this machine…

I am running PCLinuxOS 2010 KDE4 on Packard Bell Easynote W3301

CPU: Mobile AMD Sempron(tm) Processor 3000+ 1800 MHz
RAM: 1 GB
SWAP: 2 GB
GPU: ATI Technologies Inc Radeon XPRESS 200M 5955 (PCIE)
SND: ALi Corporation High Definition Audio/AC’97 Host Controller
WIFI: Atheros Communications Inc. AR5008 Wireless
Network Adapter (rev 01)
LAN: ALi Corporation ULi 1689,1573 integrated ethernet. (rev 50)
BTH: Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
SATA: ALi Corporation ULi 5287 SATA (rev 02)
HDD: Samsung HM080HC ATA 80 GB
MSE: Silvercrest (Lidl) Wireless 8 buttons mouse
PRNT: Lexmark X2650 AIO Scanner / Printer / Copier

3 HDD’s in a external USB cases:

1) HM080HC ATA 80 (74) GB 2.5 inches
2) ST950212A ATA 50 (46) GB 2.5 inches
3) 6Y200P0 ATA 200 (189) GB 3.5 inches

Changed my forum signature “My Specs” link to point to this post ;)…

Hope this answers all Your questions.

Andy

Stopping the darn akonadi server…

Hi Folks!

I have noticed that akonadi (even tho the indexing was off in KDE Control Center) was creating big .db files in my ~/.local/share/akonadi/ folder.

It’s annoying. I don’t use it. I don’t want to waste the HDD space so I googled.

I have found out about command that checks the akonadi server status:

akonadictl status

and I used it here.

[andrzejl@wishmasbell ~]$ akonadictl status
Akonadi Control: running
Akonadi Server: running
Akonadi Server Search Support: not available
[andrzejl@wishmasbell ~]$

Arggggggggghh… How to stop the dang server?

Open this file.

/home/username/.config/akonadi/akonadiserverrc

in Your favorite text editor and change value of the

StartServer=

line to false. So it looks like this.

StartServer=false

Save the file. Log out and then back in or just reboot and test the akonadictl status again

[andrzejl@wishmasbell ~]$ akonadictl status
Akonadi Control: stopped
Akonadi Server: stopped
Akonadi Server Search Support: not available
[andrzejl@wishmasbell ~]$

HECK YEAH! Now You can open this folder ~/.local/share/ and then find and remove akonadi folder inside it.

Space saved. Ram saved. CPU saved. Triple win…

Since I turned it off I don’t see any negative stuff happening here…

Regards.

Andy

Using Midnight Commander and SSH to transfer files securely between hosts.

Hi Folks.

After the previous 3 SSH related posts:

Passwordless SSH authentication. Using authentication keys,

Copying files securely between local machine and shell account and

Tightening security for SSH Server

I have decided to explain how to use Midnight Commander to transfer files between two machines using SSH server.

Machines are configured to use authenticating keys (great method of fooling the keylogger btw).

Using SSH and MC to copy files securely between hosts VIDEO

You can add extra information when logging in. Example:

username@host.domain.xxx:port/home/username/

username – Your login to the SSH server

host.domain.xxx – IP or host of the SSH server

port – number of the port that ssh works on – 22 by default

/home/username/ – Directory that You want to open on SSH server

and so on and so forth. Its simple and very useful as mc can copy multiple files / folders, it can also skip certain files if they exist on target computer (depending on multiple conditions), it can be used to overwrite files or to edit files on the SSH server. It can be used to move / delete / rename / create / chown / chmod / search files on SSH server.

Midnight Commander is one of my favorite tools. Hope You will find it useful too.

Regards.

Andy