Saturday, September 4, 2010

How to change the windows 2003 product key?

Step 1 : Run regedit and go to: HKey_Local_Machine\Software\Microsoft\WindowsNT\Current Version\WPAEvents, on the right double click on "oobetimer" and change at least one digit of this value to deactivate windows.

Step 2 : Choose run from start menu and type in this command: t to get the activation screen and go to the second option which is activate by phone.

Step 3 : In the new screen choose the option to change product key, and type in the new product key (Corporate one only).

Step 4 : In the new screen choose the option to change product key, and type in the new product key (Corporate one only).

    

How to reset forgotten root password in SuSE Enterprise Server

We do sometimes forget our passwords and what more when we don’t login to that particular account regularly.  As good system administrators who automate most of the administrative tasks, we sometimes do not login to the root account often.  This is especially so for a highly reliable and robust SLES based system.

The following technique would also work for OpenSuSE, and also most other distributions.

Step 1:  Boot your server using the installation DVD.  If the server is already powered on, you will need to do a hard power-on as you can’t shutdown (since you don’t have the root password).













Step 2: Select “Resue System” and login as root.  No password is required here.













Step 3 : You have now booted into the live DVD, that is, you have booted from the DVD and the file system mounted is that of the DVD.  You will need to access your Hard Disk Drive which is not mounted by default. (In my scenario, my SuSE 11 partition is on an extended partition and is on device /dev/sda7.  Yours maybe different and if your system is a pure SuSE 11 (which should be the case), it is likely to be /dev/sda1, if using SATA or SCSI.  If using IDE, you can try /dev/hda1. To access (mount) the SuSE 11 partition on directory /mnt;

Use the below command

 #mount /dev/sda7 /mnt

Step 4: Edit /mnt/etc/shadow which is where the encrypted passwords are stored. Note that you are not suppose to edit /etc/shadow which is one used for the Live DVD.  Furthermore, you won’t be able to save the /etc/shadow as it is a read-only filesystem.

Step 5:  Search for the entry starting with “root:”.

Step 6: Remove 2nd field (the fields are separated by the ‘:’, resulting in something that resembles

root::14329::::::

Step 7: Save and exit your editor. Remove your DVD.

Step 8: Boot into single user mode by keying in “single” at the GRUB boot menu.  You will not be able to access or change root password if you boot into graphical mode.












Step 9: After booting, you will be greeted on the command line with “Press enter for login:”, do as it says and you are in.

Step 10 : Change root password by “passwd”.  Reboot.the system, now you will be able to login with your new password.

    

Wednesday, September 1, 2010

How to enable proxy arp on Linux 2.4

What is proxy arp?

When you turn on proxy arp for a network interface card (nic), then it will answer all arp requests with its own ip-address. What does this mean?
  • When a computer wants to send an ip packet it first decides, wether the destination ip address is on the same LAN or the packet must be sent to a router (which must be on the same LAN).
  • Before it can deliver the packet to the LAN, it must know the recipient's Ethernet MAC address.
  • In order to determine the MAC address it sends an ARP broadcast package to the LAN asking "who has ip address a.b.c.d".
  • Normally only the computer with that ip address answers.
  • Proxy arp changes that: A computer doing proxy arp answers all ARP requests with its own MAC address.
  • The asking computer retrieves the MAC address and sends the packet to that computer.

When do you need proxy arp?

Proxy arp is a solution if for some reason you cannot configure a computer or other device on the LAN to use your computer as gateway instead of another one or instead of delivering all packets locally to the LAN.

How is it turned on with Linux?

With one simple command: Let's say your nic is eth1. The command would then be this:
# echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp

Turning it off again is done by: 
# echo 0 > /proc/sys/net/ipv4/conf/eth1/proxy_arp

Checking wether it's turned on: 
# cat /proc/sys/net/ipv4/conf/eth1/proxy_arp