Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 21 Sep 2018, 15:14
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Automated Script to change MAC (Physical address) - How to?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
lickthefrog2


Joined: 22 Nov 2006
Posts: 57

PostPosted: Thu 22 Feb 2007, 17:47    Post subject:  Automated Script to change MAC (Physical address) - How to?  

Hi,

I want to spoof (temporarily change) a MAC/Physical address on a computer.

I know how to do this thanks to this forum:

Code:
ifconfig ethX down

Code:
ifconfig ethX hw ether XX:XX:XX:XX:XX:XX


Then I have to go through the Network Setup Wizard to get the dhcp to recognize.

So because it's a shared computer and other users have no to little expertise with computing (and definitely not Linux), I want to write a script and put a nice button on the desktop that handles everything with a single click.

I think I can figure out how to use Rox to write a shell script to do the ifconfig thing, but what about the Network Setup part that I'm relying on buttons for? What is the script to tell the computer to try again to connect with the newly spoofed MAC address?

Thanks and if I'm using incorrect terminology, please correct me.

- lickthefrog2

Last edited by lickthefrog2 on Thu 22 Feb 2007, 18:01; edited 1 time in total
Back to top
View user's profile Send private message 
lickthefrog2


Joined: 22 Nov 2006
Posts: 57

PostPosted: Thu 22 Feb 2007, 18:00    Post subject:  

I did find this: http://www.murga-linux.com/puppy/viewtopic.php?search_id=1850490976&t=15003

And I'm trying to learn...

- lickthefrog2
Back to top
View user's profile Send private message 
HairyWill


Joined: 26 May 2006
Posts: 2946
Location: Southampton, UK

PostPosted: Fri 23 Feb 2007, 03:37    Post subject:  

Assuming that all you are using the wizard for is to get an IP address this should do it.
Code:
rm /etc/dhcpcd/dhcpd-ethX.pid
dhcpcd -d ethX

The first line is necessarry in case the dhcp daemon is already running.[/code]

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss

Last edited by HairyWill on Sun 27 May 2007, 04:16; edited 1 time in total
Back to top
View user's profile Send private message 
lickthefrog2


Joined: 22 Nov 2006
Posts: 57

PostPosted: Mon 26 Feb 2007, 14:50    Post subject:  

Thanks for the reply HairyWill.

I started with what you wrote and then poked around the forum for more advice because I still wasn't getting it. But thanks to you and others (specifically marksouth2000 from this post), I now have following script that seems to be working:

Code:
#!/bin/sh
ifconfig eth1 down
ifconfig eth1 hw ether XX:XX:XX:XX:XX:XX
if [ -e /etc/dhcpc/*.pid ]; then
   rm /etc/dhcpc/*.pid
fi
dhcpcd -t 10 eth1


Thanks...
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1459s ][ Queries: 11 (0.0163s) ][ GZIP on ]