Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

KDE How to change eth0 IP address by the network manager GUI?

663 views
Skip to first unread message

Avraham Bernholz

unread,
Aug 24, 2014, 12:08:39 AM8/24/14
to
I can change the eth0 MAC address using ifconfig, but
I want to change it with the KDE network settings because
I'm hoping it will be more permanent when set from the GUI.

But, when I go to KDE
1. Settings
2. System Settings
3. Network and Connectivity
4. Network Settings

There is nothing there about the MAC address of any NIC.
Did I miss something?

Where is the GUI for setting the MAC address of eth0?

NOTE: Here is the command-line way (but I'm looking for the GUI):
$ sudo ifconfig eth0 down
$ sudo ifconfig eth0 hw ether 00:11:22:33:44:55
$ sudo ifconfig eth0 up

J.O. Aho

unread,
Aug 24, 2014, 4:01:31 AM8/24/14
to
On 24/08/14 06:08, Avraham Bernholz wrote:
> I can change the eth0 MAC address using ifconfig, but
> I want to change it with the KDE network settings because
> I'm hoping it will be more permanent when set from the GUI.

I don't use network manager, as it has limitation (no support for
bridget devices), but found following article with some help of google:

http://sa-os.blogspot.se/2010/12/how-to-change-mac-address-on-linux.html

This seems to depend on the version of network manager and the gui in
question.

--

//Aho

Eef Hartman

unread,
Aug 24, 2014, 5:08:25 AM8/24/14
to
In alt.os.linux Avraham Bernholz <Avraham....@gmail.com> wrote:
> I can change the eth0 MAC address using ifconfig, but
> I want to change it with the KDE network settings because
> I'm hoping it will be more permanent when set from the GUI.

No, it won't be, IF a GUI exists (as far as I know it doesn't)
it would let you graphically choose the network device (eth0 etc.)
and fill in the MAC addres and then issue a
kdesu ifconfig ...
command to do the actual work (which is changing the content of the RAM
memory location the low-level netwerk system is storing that addres).
The physical MAC address isn't (and cannot be) changed at all, it is
placed in ROM (non-erasable) by the manufacturer of the netadaptor (cq
network chips if on the motherboard) your computer is using.
So as it's only the RAM stored address which is changed it will
disappear at the next reboot.

Anyway, why WOULD you wanna change it? The MAC address is only important
between your network adaptor and whatever is at the other end of your
network cable (router, switch). Unless you've got repeaters in your
local LAN that will be only those two devices

It is a bit different for wireless ethernet as the device at the other
side can be different but then it is even more important that that MAC
address is unique, so that that wireless router will not be sending your
network data to another PC/laptop/tablet or so that just happens to
have the same MAC address - because that't what it's for, for the switch
to uniquely send the right data to the right machine.

As SOLD all ethernet adaptors/chips have a unique address, which is NOT
determined by your PC cq software.
I.E. this HP computer has a:
3f:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5755
Gigabit Ethernet PCI Express (rev 02)
so the chip controlling the eth0 device is made by Broadcom and THEY
have given it its unique MAC address.

As the MAC address is unique and most modern computers have a built-in
ethernet adaptor it is sometimes used by licensing software (like
FlexNET) to determine a unique ID for that PC/laptop and that is the
only reason the ifconfig command is there: when you had to change your
network adaptor but your (commercial) software is tied to the previous
one you have to change the MAC address during boot-up BEFORE the
network subsystem is started to let the license manager do its thing
(best known: FlexNET). After the license daemon is started, changing
the MAC address doesn't do anything useful anymore, so the right place
to put the ifconfig is in the startup scripts for the network system of
YOUR distribution.
As even this isn't permanent (software updates will overwrite those
scripts) the only solution is to ask for a new license key based on your
new MAC address.

> There is nothing there about the MAC address of any NIC.
> Did I miss something?

No, you didn't, as I said, changing MAC address should be done long
before the whole GUI system is started - even before the networking
software is initialized.

Cybe R. Wizard

unread,
Aug 24, 2014, 7:17:15 AM8/24/14
to
I thought that MAC addresses were hard-coded and non-changeable.

Cybe R. Wizard
--
Nice computers don't go down.
Larry Niven, Steven Barnes
"The Barsoom Project"

Melzzzzz

unread,
Aug 24, 2014, 7:24:51 AM8/24/14
to
On Sun, 24 Aug 2014 06:17:15 -0500
"Cybe R. Wizard" <cybe_r...@WizardsTower.invalid> wrote:

> On Sun, 24 Aug 2014 04:08:39 +0000 (UTC)
> Avraham Bernholz <Avraham....@gmail.com> wrote:
>
> > I can change the eth0 MAC address using ifconfig, but
> > I want to change it with the KDE network settings because
> > I'm hoping it will be more permanent when set from the GUI.
> >
> > But, when I go to KDE
> > 1. Settings
> > 2. System Settings
> > 3. Network and Connectivity
> > 4. Network Settings
> >
> > There is nothing there about the MAC address of any NIC.
> > Did I miss something?
> >
> > Where is the GUI for setting the MAC address of eth0?
> >
> > NOTE: Here is the command-line way (but I'm looking for the GUI):
> > $ sudo ifconfig eth0 down
> > $ sudo ifconfig eth0 hw ether 00:11:22:33:44:55
> > $ sudo ifconfig eth0 up
>
> I thought that MAC addresses were hard-coded and non-changeable.

Me too ;)


--
Click OK to continue...

noel

unread,
Aug 24, 2014, 7:37:41 AM8/24/14
to
technically yes, but in reality, it's different, most modern androids
have mac addy spoofing (spoof software is aplenty for desktops too),
changes everytime in wifi at least, when you connect. and apple is also
moving that way, so forget mac address filtering on your access points.

Bit Twister

unread,
Aug 24, 2014, 8:29:46 AM8/24/14
to
On Sun, 24 Aug 2014 06:17:15 -0500, Cybe R. Wizard wrote:

> I thought that MAC addresses were hard-coded and non-changeable.

Does not matter, if it is or not.

The solution to munging the reporting MAC addy can be done via a
keyword=value in a configuration file of which is distribution
dependent.

On my Mageia distribution, a Redhat derivative, the file would be

/etc/sysconfig/network-scripts/ifcfg-<interface-name> and
/etc/sysconfig/network-scripts/ifcfg-<interface-name>:<alias-name>:

and you would add the keyword with a desired value.
Documentation snippet follows:

MACADDR=
Set the hardware address for this device to this.
Use of this in conjunction with HWADDR= may cause
unintended behavior.

DecadentLinuxUserNumeroUno

unread,
Aug 24, 2014, 8:48:56 AM8/24/14
to
On Sun, 24 Aug 2014 13:24:51 +0200, Melzzzzz <m...@zzzzz.com> Gave us:
Must be a router in that path somewhere. (software)

The actual MAC address of an 802.xx network device IS hard coded.

J.O. Aho

unread,
Aug 24, 2014, 12:17:03 PM8/24/14
to
On 24/08/14 11:08, Eef Hartman wrote:

> Anyway, why WOULD you wanna change it? The MAC address is only important
> between your network adaptor and whatever is at the other end of your
> network cable (router, switch). Unless you've got repeaters in your
> local LAN that will be only those two devices

I'm just guessing, but one reason could be if using a wifi connection
where you get say 30-60 minutes free surfing and then need to pay for
extending the time, those are quite often looking on the MAC address,
switching would give you extra free time.

Another option can be that the ISP has locked the IP to a MAC address
(mine gives away two and they are locked to a MAC address at least for a
hour after disconnecting), so if you want to change a computer and don't
want to wait, then you better change the MAC address.

Third could be that the NIC is made a company who don't care much about
MAC address and gives all the devices the same MAC address, this causes
some issues when you have more than one NIC with the same MAC in the
same network. Myself I managed to get two NICs with the wonderful MAC
address of 00:00:00:00:00:00, some cheap ones back in the early 2000.



>> There is nothing there about the MAC address of any NIC.
>> Did I miss something?
>
> No, you didn't, as I said, changing MAC address should be done long
> before the whole GUI system is started - even before the networking
> software is initialized.

You forgot RedHat and GUI only configuration, NetworkManager was built
with graphical configuration as the prime way to configure it, do
support change of MAC and the daemon is started before any network
activity or graphical system is setup.
Don't forget that you can actually restart the network without the need
of shutting down (linux != microsoft), so MAC address changes can be
done later on and the network restarted.

--

//Aho

Jonathan N. Little

unread,
Aug 24, 2014, 12:37:50 PM8/24/14
to
J.O. Aho wrote:
>
> Another option can be that the ISP has locked the IP to a MAC address
> (mine gives away two and they are locked to a MAC address at least for a
> hour after disconnecting), so if you want to change a computer and don't
> want to wait, then you better change the MAC address.

Another related situation is when you pay for a static IP with your ISP
and they use DHCP authenticate and assign that IP via your mac address.
If you want to replace your router without losing your static IP you
either have to alias the mac address with of the registered router or
have to register the new mac address with your ISP.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Avraham Bernholz

unread,
Aug 24, 2014, 11:39:23 PM8/24/14
to
Eef Hartman wrote, on Sun, 24 Aug 2014 09:08:25 +0000:

> Anyway, why WOULD you wanna change it?

There are lots of reasons, of which I see a few are shown.
My particular reasons are twofold, both of which are a variant on what
was already stated.

1. Anonymity
2. Functionality

The anonymity issue is that the router certainly knows (and might log)
the MAC address, so, changing it not only makes the device seem to be
different to the router, but, the first half makes the device *not*
always the same hardware and manufacturer.

The functionality issue is that, when I travel, I often find hotels and
other services which lock to a MAC address, but, I have a work cellphone
and a work computer and my own personal tablet. Sure, I can tether, but,
it's easier to match the MAC address.

The other reasons provided by others are just as valid.

Jasen Betts

unread,
Aug 25, 2014, 4:23:16 AM8/25/14
to
On 2014-08-24, DecadentLinuxUserNumeroUno <DL...@DecadentLinuxUser.org> wrote:
> On Sun, 24 Aug 2014 13:24:51 +0200, Melzzzzz <m...@zzzzz.com> Gave us:
>

>>
>>Me too ;)
>
> Must be a router in that path somewhere. (software)
>
> The actual MAC address of an 802.xx network device IS hard coded.

It comes from a ROM chip, but the driver that configures the
hardware can ignore it.



--
umop apisdn


--- news://freenews.netfront.net/ - complaints: ne...@netfront.net ---

Dirk T. Verbeek

unread,
Aug 25, 2014, 10:54:47 AM8/25/14
to
Op 24/08/14 om 06:08 schreef Avraham Bernholz:
Right now I only have WIFI and changing MAC is done by clicking the tool
icon above the present connection in the network manager and selecting
Wireless.
The options are manual and random.

Now you have to hope similar is available on a wired connection,
possibly under IPv4 or IPv6.

Avraham Bernholz

unread,
Aug 25, 2014, 11:08:05 AM8/25/14
to
Dirk T. Verbeek wrote, on Mon, 25 Aug 2014 16:54:47 +0200:

> Now you have to hope similar is available on a wired connection,
> possibly under IPv4 or IPv6

I don't have an icon for "network manager".
I don't even seem to have it installed:

$ networkmanager
networkmanager: command not found

Wildman

unread,
Aug 25, 2014, 11:48:27 AM8/25/14
to
Try this in a terminal (notice the hyphen):

sudo service network-manager status

--
<Wildman> GNU/Linux user #557453
The cow died so I don't need your bull!

Jonathan N. Little

unread,
Aug 25, 2014, 11:49:12 AM8/25/14
to
Because it is *NetworkManager*

jonathan@kenny:~$ which NetworkManager
/usr/sbin/NetworkManager

Linux is case-sensitive.

Wildman

unread,
Aug 25, 2014, 12:24:11 PM8/25/14
to
On Mon, 25 Aug 2014 15:08:05 +0000 (UTC)
Avraham Bernholz <Avraham....@gmail.com> wrote:

I just remembered something. Sometimes in Debian based
systems the network manager will be installed but not used.

Open /etc/network/interfaces as root. It will likely look
like this:

-------------------
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
--------------------

If it does, place a hash mark and space at the beginning
of the last two lines. That effectively deletes then or
turns them into remarks. Save it. The two lines should
look like this after the modification:
# allow-hotplug eth0
# iface eth0 inet dhcp

Next open /etc/NetworkManager/NetworkManager.conf as root.
Change this line
managed=false
to this
managed=true
and save it.

Last, enter this into a terminal:
sudo service network-manager restart

Now the network manager is in control and you should have
more options and be able to change the mac address.

Jonathan N. Little

unread,
Aug 25, 2014, 1:57:47 PM8/25/14
to
Something is not quite right, NM manages interfaces just fine with

[ifupdown]
managed=false

What makes the difference is whether or not you have the interface
defined in /etc/network/interfaces.

If it is in /etc/network/interfaces then it will not be managed, if not
then it will. So to have NM manage the interface automatically with the
service then in a terminal backup the file:

sudo mv /etc/network/interfaces /etc/network/interfaces.backup

Create a new file with just the following:
sudo nano /etc/network/interfaces

# The loopback will not be managed
auto lo
iface lo inet loopback
# End of file

Restart NM service and your interface will be automatically managed

sudo service network-manager restart

Dirk T. Verbeek

unread,
Aug 25, 2014, 2:27:42 PM8/25/14
to
Op 25/08/14 om 17:08 schreef Avraham Bernholz:
You also need to have the plasma-nm applet installed, it should show up
in the system tray.

Wildman

unread,
Aug 25, 2014, 3:05:31 PM8/25/14
to
So you are saying that setting managed=true is not
necessary. That would mean the network manager is
not using the .conf file. Is that correct?

> What makes the difference is whether or not you have the interface
> defined in /etc/network/interfaces.
>
> If it is in /etc/network/interfaces then it will not be managed, if
> not then it will. So to have NM manage the interface automatically
> with the service then in a terminal backup the file:
>
> sudo mv /etc/network/interfaces /etc/network/interfaces.backup
>
> Create a new file with just the following:
> sudo nano /etc/network/interfaces
>
> # The loopback will not be managed
> auto lo
> iface lo inet loopback
> # End of file

Yea, this what you end up with after the modification
I outlined above.

> Restart NM service and your interface will be automatically managed
>
> sudo service network-manager restart

Yep, this ain't widows. You don't have to reboot. :-)

Recently I did a right-click on the network icon in the
notification area to get the connection properties. I
received an error message telling me the information was
not available because the network was not managed. BTW
the network was working perfectly. I was curious about
what was going on so I posted to the SolydXK forum. I
got a reply from someone citing a post on the Makulu Linux
forum that started with this:

"This is a upstream issue(Debian) as Network Manager by
default does not manage interfaces. You must edit a few
files before you may use Network Manager."

That was followed by the instructions to make the changes
in my original post.

Jonathan N. Little

unread,
Aug 25, 2014, 3:32:37 PM8/25/14
to
Not sure, just know anecdotally that setting be it true or false did not
determine whether or not NetworkManger manages an interface. Only
whether or not is it defined in the /etc/network/interfaces has an
effect. When Ubuntu installs that value is false by default and yet
NetworkManger manages interfaces by default.

>
>> What makes the difference is whether or not you have the interface
>> defined in /etc/network/interfaces.
>>
>> If it is in /etc/network/interfaces then it will not be managed, if
>> not then it will. So to have NM manage the interface automatically
>> with the service then in a terminal backup the file:
>>
>> sudo mv /etc/network/interfaces /etc/network/interfaces.backup
>>
>> Create a new file with just the following:
>> sudo nano /etc/network/interfaces
>>
>> # The loopback will not be managed
>> auto lo
>> iface lo inet loopback
>> # End of file
>
> Yea, this what you end up with after the modification
> I outlined above.
>
>> Restart NM service and your interface will be automatically managed
>>
>> sudo service network-manager restart
>
> Yep, this ain't widows. You don't have to reboot. :-)

Dang Windows you have to reboot even if you just change your MS-protocol
file sharing Workgroup name...

>
> Recently I did a right-click on the network icon in the
> notification area to get the connection properties. I
> received an error message telling me the information was
> not available because the network was not managed. BTW
> the network was working perfectly. I was curious about
> what was going on so I posted to the SolydXK forum. I
> got a reply from someone citing a post on the Makulu Linux
> forum that started with this:
>
> "This is a upstream issue(Debian) as Network Manager by
> default does not manage interfaces. You must edit a few
> files before you may use Network Manager."
>
> That was followed by the instructions to make the changes
> in my original post.
>

As someone pointed out the OP my be missing the indicator app for NM for
his desktop.

Avraham Bernholz

unread,
Aug 25, 2014, 6:57:47 PM8/25/14
to
Wildman wrote, on Mon, 25 Aug 2014 10:48:27 -0500:

> Try this in a terminal (notice the hyphen):
>
> sudo service network-manager status

$ sudo service network-manager status
network-manager start/running, process 938

$ which network-manager
reports nothing

$ $ ps -elfww|grep network-manager
4 S root 1531 938 0 80 0 - 2561 poll_s 13:38 ? 00:00:00 /sbin/dhclient -d -sf /usr/lib/NetworkManager/nm-dhcp-client.action -pf /run/sendsigs.omit.d/network-manager.dhclient-wlan0.pid -lf /var/lib/NetworkManager/dhclient-<big-number>-wlan0.lease -cf /var/lib/NetworkManager/dhclient-wlan0.conf wlan0

So, "something" is the "network-manager", but, it's something I'm unfamiliar with as it's not an executable in the normal sense.

Avraham Bernholz

unread,
Aug 25, 2014, 6:59:09 PM8/25/14
to
Jonathan N. Little wrote, on Mon, 25 Aug 2014 11:49:12 -0400:

> Because it is *NetworkManager*

$ NetworkManager
You must be root to run NetworkManager!

$ which NetworkManager
/usr/sbin/NetworkManager

Jonathan N. Little

unread,
Aug 25, 2014, 7:22:49 PM8/25/14
to
Because that is the *service* not the executable!

jonathan@kenny:~$ ls -l /etc/init.d/network-manager
lrwxrwxrwx 1 root root 21 Feb 27 20:09 /etc/init.d/network-manager ->
/lib/init/upstart-job

jonathan@kenny:~$ which NetworkManager
/usr/sbin/NetworkManager


DecadentLinuxUserNumeroUno

unread,
Aug 25, 2014, 10:32:16 PM8/25/14
to
On Mon, 25 Aug 2014 22:59:09 +0000 (UTC), Avraham Bernholz
<Avraham....@gmail.com> Gave us:
then 'sudo NetworkManager'

Avraham Bernholz

unread,
Aug 26, 2014, 2:31:13 AM8/26/14
to
Jonathan N. Little wrote, on Mon, 25 Aug 2014 13:57:47 -0400:

> If it is in /etc/network/interfaces then it will not be managed, if not
> then it will.

My interfaces file appears to be the default, which, from what you wrote,
should have worked just finely.

$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)

Jonathan N. Little

unread,
Aug 26, 2014, 8:56:16 AM8/26/14
to
So since you posted elsewhere that network-manager service is running
then your NIC is being managed by NM. If you machine is connected to
your network , that is proof. Now if you want to change the IP via the
indicator app then you have to have installed and running the indicator
for the desktop that you are currently using.

GNOME/Unity => network-manager-gnome

Not sure what other DE use, others will have to advise.
0 new messages