LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 10-18-2008, 08:48 PM   #1
Rommeo
Member
 
Registered: Jan 2006
Posts: 48

Rep: Reputation: 15
Question 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.
 
Old 10-18-2008, 11:19 PM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
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
 
Old 10-19-2008, 04:25 AM   #3
Rommeo
Member
 
Registered: Jan 2006
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pinniped View Post
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

Last edited by Rommeo; 10-19-2008 at 04:34 AM.
 
Old 10-19-2008, 04:54 AM   #4
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
Can't you just tell the person who runs your school's network your new computer's MAC address?
 
Old 10-19-2008, 04:58 AM   #5
Rommeo
Member
 
Registered: Jan 2006
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Total-MAdMaN View Post
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.
 
Old 10-19-2008, 05:20 AM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
So you're trying to circumvent the rules?
 
Old 10-19-2008, 06:21 AM   #7
Rommeo
Member
 
Registered: Jan 2006
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by billymayday View Post
So you're trying to circumvent the rules?
lets kill all the linux developers that allows us to change mac adress (:
 
Old 10-19-2008, 06:30 AM   #8
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
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.
 
Old 10-19-2008, 07:25 AM   #9
Rommeo
Member
 
Registered: Jan 2006
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pinniped View Post
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.
 
Old 10-19-2008, 07:56 AM   #10
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
Quote:
Originally Posted by Rommeo View Post
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.
 
Old 10-19-2008, 03:18 PM   #11
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Quote:
Originally Posted by Rommeo View Post
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.;
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MAC-Adress change / which script to use / SUSE 10 oliju Linux - Networking 7 12-13-2005 04:22 PM
changing MAC adress? e1000 Linux - Wireless Networking 3 07-08-2004 05:13 PM
Getting NIC MAC adress thar Linux - Networking 3 06-28-2004 11:38 PM
Mac and ip adress kater0000 Linux - Networking 15 04-05-2004 06:04 PM
I need to change the MAC adress (can't connect to the net) Agna Linux - Newbie 4 03-15-2004 01:23 AM


All times are GMT -5. The time now is 02:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration