LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-24-2010, 12:41 AM   #1
raheelch
LQ Newbie
 
Registered: Feb 2010
Posts: 8

Rep: Reputation: 0
Post Shell programing for ip/mac addition in /etc/ethers file


Hi Everyone,
I am not a programmer I am running a squid server in my organization My squid server is arp based I mean we control all traffic through arp with /etc/ethers file in which we have to add mac address with ip to enable valid users to do surfing. Is it possible through shell programming to add mac address and ip address in /etc/ethers file withoug opening it. kindly HELP me.
 
Old 02-24-2010, 01:33 AM   #2
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
Quote:
Originally Posted by raheelch View Post
Hi Everyone,
I am not a programmer I am running a squid server in my organization My squid server is arp based I mean we control all traffic through arp with /etc/ethers file in which we have to add mac address with ip to enable valid users to do surfing. Is it possible through shell programming to add mac address and ip address in /etc/ethers file withoug opening it. kindly HELP me.
You cannot modify a file without opening it. But you can add a line to it by
Code:
echo 00:00:00:00:00:00 10.0.0.1 >> /etc/ethers
Or what do you exactly mean by "adding a mac address and ip address in /etc/ethers without opening it"?
 
  


Reply



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
LXer: Psystar doesn't fade away, offers sweet Linux machine in addition to Mac clone LXer Syndicated Linux News 1 05-30-2008 04:25 AM
Adding Addition File Call's metallica1973 Programming 2 12-03-2007 05:29 AM
Question of SHELL programing frankli Programming 11 07-01-2005 08:39 PM
How to make a simple addition in a shell script. philipina Programming 2 03-16-2004 04:38 AM
change login shell in mac os x, which file to edit feetyouwell Linux - Software 5 02-28-2004 06:23 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:19 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
Open Source Consulting | Domain Registration