When you run a shell command to perform a task that requires system administrator permission, you need to put
sudo in front of it.
sudo stands for “do as super user”. You will be prompted for your password (if you run several commands in quick succession, you will only get a password prompt the first time), and you must be authorized to run command as administrator (which is the case for the initial user created during an Ubuntu installation).
sudo ifconfig eth0 hwaddr 01:23:45:67:89:ab
See the Ubuntu wiki for more information.
sudo isn't enough, edit your question to be more precise. Copy-paste the command(s) that you ran and the error messages.