Posts Tagged ‘order’

How to manually disable Windows Genuine Advantage on Windows XP SP2

Wednesday, May 25th, 2011

WGA Notification message popup message

I have a pirate version of Windows XP Pro 2 installer CD which does automatically turn on Windows Genuine Advantage

This is kind of annoying as the computer gets really slow and the hard disk drive activite gets intensive as well as an annoying popup message that the Windows XP copy is not genuine does appear periodically

In order to get rid of the message I had to do the following steps:

1. Get into Windows Safe Mode without Networking

As most of the people knows this is achieved by pressing F8 keyboard key right before the Windows bootup screen appears.

After in Safe mode it’s necessery to,

2. Run Windows Command Line (cmd.exe)

To do so follow, the menus:

Windows (Start Menu) -> Run -> cmd.exe

3. In the command prompt window issue the commands:

C:Documents and SettingsUser> cd WindowsSystem32
C:WindowsSystem32> taskkill -IM wgatray.exe
C:WindowsSystem32> del wgatray.exe
C:WindowsSystem32> move wgalogon.dll wgalogon.dll.old
C:WindowsSystem32> del wgalogon.dll.old

Something to mention is you have to be really quick, with deleting wgalogon.dll, cause wgatray.exe is scheduled to run every 1 / 2 seconds 🙂 It is a bit of situation of type “be quick or be dead” as Maiden used to sing 🙂
A Windows system restart and Hooray the Windows Genuine message is gone 🙂

How to make a mysql root user to login interactive with mysql cli passwordless

Wednesday, June 29th, 2011

MySQL Logo Passwordless root login .my.cnf

I’m using access to the mysql servers via localhost with mysql cli on daily basis.
With time I’ve figured out that it’s pretty unahandy to always login with my root mysql password, I mean each time to enter it, e.g.:

root@mysql-server:~# mysql -u root
Enter password:
...

Thus to make my life a way easier I decided to store my mysql root password in order to allow my root admin user to be able to login to my mysql server without asking for password. This saves time and nerves, as I’m not supposed to look up for the password file I store my server mysql root pass.

To allow my mysql cli interface, to login passwordless to the SQL server I had to create the file /root/.my.cnf readable only for my root user and store my MySQL username and password there.

Here is a sample /root/.my.cnf file:

root@mysql-server:~# cat /root/.my.cnf
[client]
user="root"
pass="mysecretMySQLPasswordgoeshere"

Now next time I use the mysql console interface to access my mysql server I don’t have to supply the password, here is how easier is the mysql login afterwards:

root@mysql-server:~# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 3520
Server version: 5.0.77 Source distribution

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.

mysql>

The only downside of using .my.cnf to store permanently the mysql server root and password is from security standpoint.
If for instance somebody roots my servers, where I have stored my root user/pwds in .my.cnf , he will be able immediately to get access to the MySQL server.

Another possible security flaw with using the mysql passwordless login “trick” is if somebody forgets to set proper file permissions to, .my.cnf

Once again the file should possess the permissons of:

root@mysql-server:~# ls -al /root/.my.cnf
-rw------- 1 root root 90 Apr 2 00:05 /root/.my.cnf

Any other permissons might allow non-privileged users to read the file and gain unathorized admin access to the SQL server.
 

How to change order of network cards eth0 and eth0 (swap lan cards) on Debian GNU / Linux

Friday, September 21st, 2012

Swap eth0 and eth1 lan card / how to change network card order on Debian Gnu / linux

I have a Debian server with 2 network adapter cards – (eth0 and eth1). The first lan card eth0 is Mainboard embedded (integrated) one.

The hardware of the Lenovo ThinkCentre host was purchased with one LAN Card but a second one was added in order to make the machine capable of doing NAT routing with iptables.

The machine is to be configured as a router in 1st lan card eth0, an internet UTP cable should influx and the 2nd lan card is to be connected to a Network Switch and will be used to NAT network traffic from the internal network of number of hosts with assigned local IP addresses like (192.168.0.1 – 255) etc.

Everyone knows that integrated Network cards, are usually inferior to the normal non-integrated ones and besides that if a high voltage (during Weather Storm) enters through UTP cable attached to the integrated LAN Card it is quite likely the whole Mainboard to burn out …

With saying this back to my case I had to make the Internet to connect on eth0 on a Debian Linux host which was supposed to run as a Network router. As eth0 was the one where I had to configure the Internet real IP address to be assigned, I preferred eth0 to be attached to the non-integrated Ethernet Card which was automatically recognized and assigned to be eth1 by kernel.

Therefore I needed to swap interfaces eth0 and eth1, here is how this is done on Debian GNU / Linux Squeeze (6.0.5):

1. Edit /etc/udev/rules.d/70-persistent-net.rules


# vim /etc/udev/rules.d/70-persistent-net.rules

The file content should look something similar to:


# This file was automatically generated by the
/lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="90:f6:C2:3d:76:f5", ATTR{dev_id}=="0x0",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",

ATTR{address}=="8d:89:a5:c2:e8:f8", ATTR{dev_id}=="0x0",

ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

Swap eth0 and eth1 definitions so eth0 becomes eth1 and vice versa, e.g.:


SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",

ATTR{address}=="8d:89:a5:c2:e8:f8", ATTR{dev_id}=="0x0",

ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="90:f6:C2:3d:76:f5", ATTR{dev_id}=="0x0",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

To make udevd, reassign eth0 / eth1 cards orders restart udev daemon:


# /etc/init.d/udev restart
...

or restart the system, i.e.


# restart

That should swap the Lan card order as recognized by Linux. Cheers 😉

PHP system(); hide command output – How to hide displayed output with exec();

Saturday, April 7th, 2012

I've recently wanted to use PHP's embedded system(""); – external command execute function in order to use ls + wc to calculate the number of files stored in a directory. I know many would argue, this is not a good practice and from a performance view point it is absolutely bad idea. However as I was lazy to code ti in PHP, I used the below line of code to do the task:

<?
echo "Hello, ";
$line_count = system("ls -1 /dir/|wc -l");
echo "File count in /dir is $line_count \n";
?>

This example worked fine for me to calculate the number of files in my /dir, but unfortunately the execution output was also visialized in the browser. It seems this is some kind of default behaviour in both libphp and php cli. I didn't liked the behaviour so I checked online for a solution to prevent the system(); from printing its output.

What I found as a recommendations on many pages is instead of system(); to prevent command execution output one should use exec();.
Therefore I used instead of my above code:

<?
echo "Hello, ";
$line_count = exec("ls -1 /dir/|wc -l");
echo "File count in /dir is $line_count \n";
?>

By the way insetad of using exec();, it is also possible to just use ` (backtick) – in same way like in bash scripting's .

Hence the above code can be also written for short like this:

<?
echo "Hello, ";
$line_count = `ls -1 /dir/|wc -l`;
echo "File count in /dir is $line_count \n";
?>

🙂

How to install GNOME server on Ubuntu 10.04.2 LTS Lucid

Wednesday, April 20th, 2011

After some upgrades of Ubuntu from 9.10 to Ubuntu 10.04.2, I faced problems during apt-get upgrade && apt-get dist-upgrade

I had to fix it up with apt-get upgrade -f , however the “fix” which was targetting a fix up to the apt-get dist-upgrade removed about 260 packages, among which were the grub boot loader , xorg-server and even gnome

As in order to fix the package mishap the apt-get update -f was my only possible solution I went by and confirmed that I would like to wipe out all the packages.

Logically afterwards it was required that I install my missing xorg-server and gnome in order to make the Ubuntu desktop work again.

Here is how:

ubuntu:~# apt-get update && apt-get xorg-server ubuntu-desktop

The ubuntu-desktop is a meta package which installs the GNOME environment.

God’s Grace

Monday, March 5th, 2007

God was graceful to Habib and it looks like he hear our prayers. UK Visa was granted to Habib for the maximum period of 6 months. Praise be to God for this! Also ORDER’s tuition fee seems to stay the same as in the news in the universite website is said “By The Grace of God .. etc.” :]Also great thing it is there is peace in my home. Today I was on church and on the way for the church I met Bonchev, he was drunk and carrying accordion. He wanted to go to the Church in that state.But in the end I was able to convince him not to come to the Liturgy (It would be fun if he entered the church drunk hardly staying on his feets. I had some spiritual problems during the day mainly the Python Spirit is trying to attack me, that’s awful spirit in the name of Jesus Christ I command you to go in hell where your place is! Amen. I played today some MAME games, watched Cartoon Network,I was out on a coffee with Lily. Mitko and Habib come in the end from Sofia.

Quiet and Peaceful Day

Tuesday, March 6th, 2007

The day was Peaceful and Quiet. After I wake up Narf called and we see each other in front of the college, Nomen was ther elso we drink coffee on the fountain. Mitko told us experiences he had from Sofia, we laughed a lot. Then we go to the Chineese restaurant with Amridikon and Needless. I like the Rise with Vegetables there really awesome food :]. After that I bought “A Practical Teacher in C” and went home. Lily come home for 10 minutes, I read the Holy Bible for some time then I read The Living of the Martyr’s. Later Niki and Habib come home, and was my guests for some time. After that I take a shower chatted a little with Order and now I intend to go to bed. Thanks to God for taking care for my life and giving me peace and joy through his Holy Spirit. Thanks God!END—–

Troubled Day

Thursday, April 5th, 2007

It was a day full of waiting. The Admin/tech support personel in sofia is a real pain in the ass. I waited half a day for a simple debian base install. The guy installed debian over already installed freebsd on a server we sent destined for colocation in evolink. The machine is great dual 3ghz Xeon with 3 x 70 gb SCSI discs. In 4:00 o’clock I received a mail with username and password of the server, but the system was unaccessible for 1 more hour. I got really nervous I received tons of calls from the boss, our project Manager, Vladi the PHP programmer. I logged to the server in 5:00 and configured apache with mysql upto 10:00 o’clock then did a little walk with nomen in the central park and drinked one beer per capita. I had to meet Static and Amri in 6:00 o’clock but I was busy configuring the new rack so I missed a great oportunity to have fun with old friends. ORDER has to come back to Bulgaria, today or even he maybe is already in Varna. I’m quite impatient to see him! In the afternoon I went to some spiritual downfalls but now Thanks to God I’m alive and well. The pozvanete site already points to the new rack so I hope the machine would be able to serve it’s goal perfect. This will be made clear in the morning. Soon I’m going to bed. Glory be to God for fulfilling me with his love and sustaining my life and keeping me from evil! END—–

Opera!

Saturday, May 10th, 2008

Yesterday I and Alex went to an Opera. We watched Opera by Giuseppe Verdi called “La Traviata”.It’s the second time I see this opera, the first time was when I was still a puppil.Pretty awesome opera the actors were really good. And this classic music! Awesome!After the Opera performance I phoned to Ivo a.k.a. (Order)we went to a sort of pub which wasextremely cheap considering the fact it was near the center and the food and drinks were really good.After all this we had a walk around in Varna and hitted the road back to Dobrich.Kimmo My finish colleague is leaving for Finland and was organizing farewell party.Unfortunately because of the Opera I was unable to go to the party. Yesterday was a really niceday considering that nice opera show. The bad news for me yesterday was that I didn’t passedthe written exam in German and I have to go to the re-sit at Tuesday. With the Lord’s helpI hope I would pass it 🙂 Also I’m going to start for the Accounting exam because It’s at Monday.END—–

Nokia 9300i Communicator with final firmware Symbian version 6.27 still contains an old telephone hanging bug

Sunday, September 5th, 2010

Earlier I’ve written an article tagged How to reset to factory defaults (hard reset) hanged Nokia 9300i device / How to format your Nokia 9300i

Therein I explained how I ended up with an unbootable telephone after improperly shutting down my Nokia directly removing the battery instead of pressing the Nokia front turn off button first and then remove the battery.

Two months ago in order to get rid of the annoying nokia hanging on boot up bug I decided to flush my firwmare.
The firmware was a flushed by a friend of me who is a Mobile software specialist he used a special so called double cable and a special software programmer device which is required to flush up a certain range of mobile phones models.

Since the firmware update my Nokia was equipped with the latest firmware version provided by Nokia corp before Nokia dropped the support for the phone.
The latest Nokia firmware version available which was installed on my phone was 6.27.(0)

For two months the Nokia worked just fine, however just recently once again after a couple of different SIM card changes with the phone, the phone hanged the same time as described in my earlier written article How to reset to factory defaults (hard reset) hanged Nokia 9300i device / How to format your Nokia 9300i

This pissed me off and I once again had to follow the necessary described steps about formatting the Nokia 9300i Communicator mobile device as it’s explained in the up-mentioned article.

The format went fine nevertheless the newer phone firmware version.
The format completed quite quickly once again it took in between 30 seconds and a minute to complete.

The good news after the format of my hanged Nokia phone was that it kept the newer firmware version, even after reverting to facture defaults with the firmware format.
Now thanksfully still my Symbian OS version is still 6.27(0)

It’s rather strange that even the newest avaialable firmware patch for the Nokia 9300i doesn’t fix such a vital boot up mobile hang error.

Hope this info is helpful to somebody out there.