Friday, August 31, 2012

How to change the mac adress in Fedora


1.[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:23:8B:6A:7E:9E
inet addr:10.1.128.244 Bcast:10.1.255.255 Mask:255.255.0.0
inet6 addr: fe80::218:8bff:fedb:7e9e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:79086 errors:0 dropped:0 overruns:0 frame:0
TX packets:40319 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:72461556 (69.1 MiB) TX bytes:5245562 (5.0 MiB)
Interrupt:17


Here, eth0 is the ethernet interface of your system. The mac address is put in red.

2. Change your mac address using the following syntax

ifconfig eth0 hw ether 00:18:8B:CA:7E:90

The new value (in green) must be hexadecimal

3. if you have a dhcp server that distributes the adresses automatically, then request a new adress for your eth0 interface

[root@localhost ~]# dhclient eth0

5. Now, your interface is up and have a new mac and IP addresses. This feature may be useful if the network administrator ban you according to the mac adress, for example .........

 

With Thanks & Regards,

Rajesh S

 

Device eth0 does not seem to be present, delaying initialization

# service network restart
Bringing up interface eth0:  Device eth0 does not seem to be present, delaying initialization.
[FAILED]

I Checked the message buffer of the kernel, it prompted eth0 had been renamed to eth3, and eth1 to eth2.
# dmesg|grep eth
… …
[    4.494092] udev[396]: renamed network interface eth1 to eth2
[    4.549086] udev[396]: renamed network interface eth0 to eth3

So I created the configuration files for eth2 and eth3.
# cd /etc/sysconfig/network-scripts
# mv ifcfg-eth1 ifcfg-eth2
# mv ifcfg-eth0 ifcfg-eth3

Modify the DEVICE to eth2 and eth3 in ifcfg-eth2 and ifcfg-eth3 files respectively using vi editor.

Restart the network servcie, it reminded me they used different MAC address.
# service network restart
Bringing up interface eth3:  Device eth3 has different MAC address than expected, ignoring.
[FAILED]

Get their MAC addresses, and append them to ifcfg-eth2 and ifcfg-eth3 files.
# cat /sys/class/net/eth2/address >> ifcfg-eth2
# cat /sys/class/net/eth3/address >> ifcfg-eth3

Use vi editor to change the MAC addresses to the appended.

Restart the network service again, they worked.

 

 

With Thanks & Regards,

Rajesh S

 

Tuesday, August 28, 2012

How to make USB as bootable disk

 

Open diskpart.exe

And execute the following cmds

·         list disk

·         select disk # (#--> 1 or which disk u want to format : ex select disk 1)

·         clean

·         create partition primary

 

 

With Thanks & Regards,

Rajesh S

 

Friday, August 3, 2012

Launch any file path from web page

Launch any file path from web page

 

<html>

<head>

<base href="file://">

<script>

function DoIt() {

  alert(document.getElementById("cmdToRun").value);

  document.location=document.getElementById("cmdToRun").value;

}

</script>

</head>

<body>

<select id="cmdToRun">

<option value="/usr/sbin/netstat">Launch /usr/bin/netstat</option>

<option value="/etc/passwd">Launch /etc/passwd</option>

<option value="/Applications/Utilities/Bluetooth File Exchange.app">

Launch Bluetooth File Exchange.app</option>

</select>

<br />

<input type=button value="Launch" onclick="DoIt()">

<br />

</body>

</html>