LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   how to change mac adress ? (https://www.linuxquestions.org/questions/ubuntu-63/how-to-change-mac-adress-677474/)

Rommeo 10-18-2008 08:48 PM

how to change mac adress ?
 
hi
i was using a laptop before at my school's network. Now i changed my laptop and installed latest version of kubuntu. But the problem is without changing my mac address, i cant use internet. So i changed the mac adress by a command but i dont want to use commands everytime i start the computer. So my question is, What should i do to change the mac adress of the computer automatically ?

i tried to add this line:
Code:

hwadress ether 00:macadress
at : /etc/network/interfaces
Didnt Work..
also tried many lines there but didnt work

Can someone tell me please what line should i add to where to change my mac adress ?

Thanks in advance.

pinniped 10-18-2008 11:19 PM

It should just be:
hwaddress ether XX:XX:XX:XX:XX:XX
within your interface stanza

Otherwise you might try a pre-up with:
ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX

Rommeo 10-19-2008 04:25 AM

Quote:

Originally Posted by pinniped (Post 3315184)
It should just be:
hwaddress ether XX:XX:XX:XX:XX:XX
within your interface stanza

Otherwise you might try a pre-up with:
ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX

pinniped i tried that one .. But unfortunately it didnt work.
i wrote

my /etc/network/interfaces file is :
Code:

auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0


iface eth0 inet static
address 10.whatelse
netmask 255.whatelse
gateway 10.whatelse
hwaddress ether 00:whatelse

auto eth0

it does not work.

Where should i write ?
Code:

ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX

Total-MAdMaN 10-19-2008 04:54 AM

Can't you just tell the person who runs your school's network your new computer's MAC address?

Rommeo 10-19-2008 04:58 AM

Quote:

Originally Posted by Total-MAdMaN (Post 3315331)
Can't you just tell the person who runs your school's network your new computer's MAC address?

But the problem is, i still have my old laptop and i ll use old and new one.

billymayday 10-19-2008 05:20 AM

So you're trying to circumvent the rules?

Rommeo 10-19-2008 06:21 AM

Quote:

Originally Posted by billymayday (Post 3315347)
So you're trying to circumvent the rules?

lets kill all the linux developers that allows us to change mac adress (:

pinniped 10-19-2008 06:30 AM

In the interfaces file, just put:

pre-up /sbin/ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX

You can also ignore the ifup/ifdown scripts altogether and just configure everything with ifconfig somewhere in the network startup scripts.

Rommeo 10-19-2008 07:25 AM

Quote:

Originally Posted by pinniped (Post 3315386)
In the interfaces file, just put:

pre-up /sbin/ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX

You can also ignore the ifup/ifdown scripts altogether and just configure everything with ifconfig somewhere in the network startup scripts.

it works !!!
Thank you so much piiniped.

Total-MAdMaN 10-19-2008 07:56 AM

Quote:

Originally Posted by Rommeo (Post 3315334)
But the problem is, i still have my old laptop and i ll use old and new one.

So get the network admin to keep the old and add the new.

billymayday 10-19-2008 03:18 PM

Quote:

Originally Posted by Rommeo (Post 3315374)
lets kill all the linux developers that allows us to change mac adress (:


No, you are the one in the wrong, don't blame the tool maker for the poor tradesman.;


All times are GMT -5. The time now is 09:58 PM.