LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-04-2010, 06:23 PM   #16
vastvet
LQ Newbie
 
Registered: Jan 2010
Posts: 20

Original Poster
Rep: Reputation: 0
howto?


Quote:
Originally Posted by Elv13 View Post
You have to create /etc/network/ and /etc/network/interfaces, fill them as specified above, REMOVE network manager ( ) and them restart the network
sudo /etc/init.d/networking restart

It -might- work if everything is configured correctly, unfortunately, it can also fail if your configuration is not right.
wich thing to start first with?how can i create those /etc/network pathes?what if they are allready their in the /etc directory?Do i need to remove the old /etc/network/ and /etc/network/interfaces pathes first including files? or howto do it corectly?cause if do wrong needs new isntal in most cases..

most logically for me would be;
1-delete network manager first - apt-get purge networkmanager
2-create the pathes and files?if they arent allready their how to make?in console su or how?
3-than restart the network
sudo /etc/init.d/networking restart [maby reboot also]
is this way correct?if yes in wich linux distro this works?sorry for asking but i want to be sure before i instal an new distro again..
Is it posible for the distro makers to not putin this network manager, but as an packages choice in the instal itself so people can choose to instal it or not?if not i hope the makers make an good working mac changer into the network manager itself, and ecample is pc-bsd [not linux i know] wich have it intergrated in the entwork manager...

p.s. i have doubts if the new linux distros are really getting better,cant remember having these probs in the old ones.

Last edited by vastvet; 01-04-2010 at 06:33 PM.
 
Old 01-04-2010, 06:35 PM   #17
vastvet
LQ Newbie
 
Registered: Jan 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Wich distro is recommended to test the manualpermanent mac address spoof?is it debian, fedora,mandriva or ubuntu?One of the new ones i meen 2010 versus newbie.
 
Old 01-04-2010, 06:52 PM   #18
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
You can edit the file using the following commands in a terminal
Code:
su
cp /etc/network/interfaces /etc/network/interfaces.backup
nano /etc/network/interfaces
"nano" is a text editor, how to save the file and quit from the editor are shown at the bottom of the terminal while running nano.

If I understand your situation correctly, you need to make the file look like this:
Code:
auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp
   hwaddress ether 00:11:22:33:44:55

allow-hotplug eth1
iface eth0 inet dhcp
   hwaddress ether 00:11:22:33:44:66
Um, no, you will not need to reinstall if you make a mistake.

For details please see: http://people.debian.org/~osamu/pub/...l/ch05.en.html

Evo2.

Last edited by evo2; 01-04-2010 at 06:53 PM. Reason: backup file
 
0 members found this post helpful.
Old 01-04-2010, 06:55 PM   #19
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Quote:
Originally Posted by vastvet View Post
Wich distro is recommended to test the manualpermanent mac address spoof?is it debian, fedora,mandriva or ubuntu?
Any.
Quote:
One of the new ones i meen 2010 versus newbie.
What does that mean?

Evo2.
 
0 members found this post helpful.
Old 01-05-2010, 12:08 PM   #20
vastvet
LQ Newbie
 
Registered: Jan 2010
Posts: 20

Original Poster
Rep: Reputation: 0
distro recommended

Quote:
Originally Posted by evo2 View Post
Any.

What does that mean?

Evo2.
what i meen by this is, wich linux distro is recommended for an newbie while doing this permanent macaddress spoof "operation"
 
Old 01-06-2010, 03:08 PM   #21
vastvet
LQ Newbie
 
Registered: Jan 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Did new instal of fedora12 again, i came up with an idea to recheck the packages before isntalling them, i saw 5 packages that had Networkmanager in the name so i put them of, that was a little fighting with the buttons but that visually worked so i installed it,after that went ok i was sorta happy yes! the networkmanager is gone...so i logged into fedora12 and what was their #$^% networkmanager was shining bright... well i guess putting off packages was a waste of time..so i go to services and putoff the networkmanager and killed it.
The thing thing i did was putting the commands again in rc.local and i added extra service network start on almost the end of the line before exit.and i saved it in SU where i did go to gedit /etc/rc.local.
The next reboot after i typed exit/ reboot the system freezed at the blie screen with the little fedora F in the middle,i did an hard reset/reboot of pc and stil the same, so i guessed i F%$^#$ it up again and managed to crash the system, or is the kernel not letting me?or what am i doing wrong? (-,-)

Lets say i do an new instal of fedora 12, wich packages should i puttoff?wich services after the instal should i do on or off?in fedora12,what ,where in with path wich field do i have to set commands for fedora12?to permanent change the mac address, this same i want to know for Debian, for now i want to know example for these two distro to keep it easy,fast and direct,if not work i wil ltry ubuntu and mandriva as second choice for now unless someone can help me personally by instant messenger and can advise an new distro he/she knows from the insideout to help me with this boring mac change permaspoof.

Last edited by vastvet; 01-09-2010 at 07:11 PM.
 
Old 01-24-2013, 12:26 PM   #22
ironwalker
Member
 
Registered: Feb 2003
Location: 1st hop-NYC/NewJersey shore,north....2nd hop-upstate....3rd hop-texas...4th hop-southdakota(sturgis)...5th hop-san diego.....6th hop-atlantic ocean! Final hop-resting in dreamland dreamwalking and meeting new people from past lives...gd' night.
Distribution: Siduction, the only way to do Debian Unstable
Posts: 506

Rep: Reputation: Disabled
For debian 6.0 7.0 aka, the newer 2010,11,12,etc debian based distros....not sure if this will work in anyBUNTU versions as I don't like buntu's, there not really debian, they strayed too far.

I am useing wicd daemon for my network
Therefore network/interfaces is not used anymore.

here is a little script I found to randomise mac at every reboot.
I use eth0 for wired
and wlan0 for wireless on my laptop, change script for your interface names.



killall /opt/wicd/daemon.py # closes use of eth0 by Wicd
sleep 1

ifconfig eth0 down # deactivate eth0

macchanger -A eth0 # change mac address for eth0

sleep 1 # wait a little to get different random mac addresses

macchanger -A wlan0 # change mac address for wlan0

ifconfig wlan0 up # activates wlan0

sleep 1

/opt/wicd/daemon.py 2> /dev/null # starts Wicd daemon again

sleep 4

/opt/wicd/tray-dapper.py 2> /dev/null # starts the Wicd tray

sorry folks, I just found this and am still working on it, he didn't mention where to put the script for it to activate at every reboot.
I am at work doing this so am distracted. I will post back after dinner.
 
Old 02-02-2013, 01:40 AM   #23
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 361

Rep: Reputation: 76
Startup script creation

re ironwalker

To get a script to run at boot in Debian:
The script must be LSB complient and be placed in /etc/init.d, then registered.

Below is a sample of your script with an LSB header, in this example you would name it-> "randommac", and place it in /etc/init.d
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides:          randommac
# Required-Start:    mountdevsubfs 
# Required-Stop:      
# Should-Start:      networking
# Default-Start:     2 3 4 5
# Default-Stop:      1 0 6
# Short-Description: Configure network devices with random mac adderess
### END INIT INFO

killall /opt/wicd/daemon.py # closes use of eth0 by Wicd
sleep 1

ifconfig eth0 down # deactivate eth0

macchanger -A eth0 # change mac address for eth0

sleep 1 # wait a little to get different random mac addresses

macchanger -A wlan0 # change mac address for wlan0

ifconfig wlan0 up # activates wlan0

sleep 1

/opt/wicd/daemon.py 2> /dev/null # starts Wicd daemon again

sleep 4

/opt/wicd/tray-dapper.py 2> /dev/null # starts the Wicd tray
After placing the randommac script in /etc/init.d, register it with these two commands as root or sudo:
Code:
chmod 0755 /etc/init.d/randommac
update-rc.d randommac defaults
Upon reboot, the script should be launched, if it did not produce the desired effects, there may be a problem in the design of the script or it was not started at the right time in the boot sequence.
The LSB header in this example will have this script started after the networking script which is also in /etc/init.d as defined by the "# Should-Start:" entry in the LSB header. If you want to try starting it somewhere else in the boot sequence for troubleshooting purposes, install insserv and graphviz to view the boot sequence of scripts and change the "# Should-Start:" entry to include the script in the graph produced by graphviz prior to where you want randommac to run.

To use graphviz to see the boot sequence of boot scripts, install insserv and graphviz and run a couple commands as such:
Code:
aptitude install insserv graphviz
/usr/share/insserv/check-initd-order -g > boot.dot
dotty boot.dot
After running the two commands following the aptitude install command, a graph should pop up, navigate using arrow keys to scroll the entire graph to find your "randommac" script.

To get more info on LSB complient scripts, check this link
If you make changes to the script after finding it does not work, ensure the permissions are set to 0755 as defined by the chmod command suggested earlier.

Last edited by Brains; 02-02-2013 at 01:57 AM.
 
  


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
"...Device eth0 has different MAC address than expected,.." lothario Linux - Networking 11 08-05-2014 11:24 PM
Occasionally-- "connected with self-assigned address," "deactivating device eth0" MaxIBoy Debian 4 10-04-2009 11:50 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 08:11 PM
"Installing non-distro Linux on USB key" or "Using syslinux to boot a jffs2" lymae Linux - Newbie 6 12-31-2006 11:00 PM


All times are GMT -5. The time now is 12:38 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration