Vinayaka.B.S. wrote:
Dear Sir.,
Can u please guide me in the issue of extraction of Hardware address
of Ethernet card in Linux by providing a code for the above.,
I'm using Linux 6.0 Hedwig Edition.,
Thanking You.
If you can get the card detected by the kernel at all, and successfully ifconfig'ed, ifconfig can then show you the hardware address:
root@dilbert:/proc/net$ ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:3924 Metric:1 RX packets:3295144 errors:0 dropped:0 overruns:0 frame:0 TX packets:3295144 errors:0 dropped:0 overruns:0 carrier:0 Collisions:0 eth0 Link encap:Ethernet HWaddr 00:60:97:9D:36:98 inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:744305466 errors:40 dropped:0 overruns:2 frame:67 TX packets:760536636 errors:0 dropped:0 overruns:0 carrier:365 Collisions:11443106 Interrupt:10 Base address:0xe000
-- Dan Wilder
If the tapes were created on an AS/400 they are probably in EBCDIC whereas your PC is probably using ASCII. I have successfully used the "dd" command to read tapes from an IBM mid-range computer. Depending on how the tape was created it may have "header records" in front of the data. One way to proceed would be to take the tape to an AS/400 and print a "VTOC" (volume table of contents). This would show the block size, etc. Try the "dd" command to read the tape. Also, try the "non-rewind tape option" (look in the /dev directory for your tape drive device, if it is "mt0" the non-rewind device is probably "nmt0". The non-rewind device allows you to position the tape read/write head to a particular file on the tape, rather than each read or write request re-winding the tape back to the start). It would be something like this "dd if=/dev/nmt0 of=myfile ibs=32768 obs=32768 cbs=512 conv=ascii".
if = input file
of = output file
ibs = input block size
obs = output block size
cbs = convert block size (This is the record length of the records coming in from the tape, so you need to know the record length.)
conv = ascii (This tells the "dd" program to convert the data to ascii).
Using nmt0 instead of mt0 will cause the tape head to not re-wind so you can read the next file on a subsequent "dd" command.
This is in response to a question from Layton Davis in the Feb., 2001 issue about reading tapes from other OS'.
The first question I would ask is how (software - command) is Layton attempting to read the tape? I often read tapes from Sun, AIX, HP, and others on my Linux box. The tapes have all been created using "tar".
I have to do this every time I load a new tape.
I have 3 tape drives. The first uses old QIC-6150 tapes, very old but still works great. The second is a 4mm DAT tape drive. The third is a 8mm DAT drive, but I don't believe the type of drive will matter.
I have been using Linux to read CAD data from the different flavors of Unix for about 4-5 years and have had to use the same method of setting the block size from the start. Some tapes may not need to have the block size set in this way but by setting it I can read anything that doesn't have a problem on the tape.
Joseph St.Clair - KSI Machine & Engineering
Hello Answer Guys,
I was catching up on your column recently and I noticed the below in the January edition (edition 61)of Linux Gazette.
Ling Ling asked,
... I have a RH 6.2 server running as FTP server. Upon customer response, I will have to send certain syslog message to their LAN account, like say admin@system.com.
Depending on what Ling Ling needs mailed from from the log file, "Logcheck" from https://www.psionic.com may be just what Ling Ling needs. I use this tool to selectively e-mail to myself at home and at work certain logfile entries from /var/log/messages and /var/log/secure. The logcheck utility can be trained to parse the logfiles for messages of various formats. That way, you don't have to send the complete logfile, only the entries you need to worry about. For my case, I am now aware of ftp connections, ftp file transfers, and various questionable connection attempts against services that I do not run, or otherwise reperesent signatures for possible attacks. I even get the source IP address and hostname logged from some other utilities that I run to try and keep up with my system's status. All this shows up in my e-mail at preselected intervals and sure beats wading through the complete log file everyday.
Hope this helps,
Ben Beeson
I just came acrossed an article in which a person asked about antivirus software being used on a mail server to check mail destined for Windows machines. One that I have tried, used, and recommend for just that is made by Kaspersky Labs/Central Command. The link is https://www.avx.com You can use gui or command line virus scanning, and it can be configured using cron jobs to scan individual folders, times, frequency. In my personal evaluations of more than 30 antivirus software packages for various operating systems and network topologies, the AVX line always ranks right up at the top. The Windows version has network scanning built-in, and the linux version can also scan NFS/Samba shares. The cost for full version is less than $50.00. They also have a trial version too for evaluation.
--
Thank You for Your time,
Ed Wiget
Senior Network Security Adviser
When reading code written by other people, I often have to change my tab width setting in vim and emacs to make everything indent like the original author intended. To make this a simple, single key operation, I added the following to my .vimrc and .emacs files.
Here's the .vimrc addition:
See attached misc/tips/tabstops.vimrc.txt
Note that the ^M is a single character (generated in insert mode with CTRL-V<return> .
Here's the .emacs version:
See attached misc/tips/tabstops.emacs.txt
Both of these use the F1 key, but it should be obvious how to change it to another key.
Enjoy.
Theodore Roth
Antonio Sindona wrote:
Hi,
I'm actually looking for the following packages:
1) An application performance analisys tool, to understand the load for each process in terms of CPU, mem and so on.
2) A simulation tool (something better than the SIMULA67 language ...)
3) A network monitoring tool (possibly with graphic interface ...)
May You suggest something to me (possibly free software) ?
Thanks
Hey Antonio,
I cannot answer your first two questions. As far as a network monitoring tool is concerned, do you only need packet sniffer functionality. For LInux, there is a tool called ethereal. It collects packets and can dissassemble those packets.
If a packet sniffer (for IP traffic) is not your desired goal, I will venture to guess that you really want a network monitoring tool which determines the health of your network. An example would be an SNMP (Simple Network Management Protocol) manager. An example of this would be HP OpenView. HP OpenView costs lots of money, and I am only citing this tool as an example of a network manager. SNMP network managers (the software) can display graphs of data throughput and all kinds of other stuff by retrieving variables from an abstract database called a MIB (Management Information Base). Is this what you desire?
You can also monitor network traffic (in a kind of raw form) by using tcpdump. See the man page for tcpdump for its usage. I use tcpdump when I am doing network troubleshooting.
- I performed a search on www.google.com (a wonderful search engine) and got lots of hits. One interesting site that it found was at:
- https://rak.isternet.sk/win/linux-netman/monitoring.html
I hope that this stuff helps you, Antonio.
Good luck, Chris Gianakopoulos
hello,
here's a 2c tip for all who are lookin for a appropriate X-server: for a long time I was looking for a working X-server for my ATI rage fury card. But then i have heard of the wonderful framebuffer device which makes it possible to get nearly every graphics card to speak X. So I added fb device to my 2.2.14 kernel, made the devices and the magic began. In addition both 640*480 and 800*600 sizes appeared on my tv screen also And all color depths are selectable. Detailed description can be found on the SuSE faq pages. Now I'm very happy i can also play (sound) with Tux in the living room.
Cheers, Reiner
To delete the directory, just specify the entire path;
rmdir /home/-h
Or use option "--" to signify no more options. Many GNU commands follow this convention.
rmdir -- -h
-- Mike
You don't have to remember to run pwd to figure out where "here" is. ./-h (dot slash dash h) would also get rid of the annoying -h filename, by referring to the current directory (dot).
-- Heather
Baffled - When I first connected a Linux (RH 5.1) to a cable modem 18 months ago I experienced the same "problem" logging on - no password required. I formatted and reloaded 5 times in a month before I built a firewall. The requirement for a password has remained intact since I put a firewall between me and the Internet. By the way, the "experts" recommend reformatting to fix a compromised system unless you have a clear picture of precisely what happened.
A Rather Unique Query (I hope) - I recently upgraded from RH 6.1 to RH 7.0 on one of my systems and had no graphics after the upgrade. After a bit of exploration, I found that RH 7.0 has switched to XFree86 Version 4.0. Version uses a new driver model and there aren't yet many drivers available. With a visit to XFree I found Version 4.0.2 which included a driver for my old Trident 9660.
Claude Baker
First, let me comment that I think TAG is exceptional. I stumbled upon it by accident, and ended up reading every question and answer, and after this email, will be going to look for previous months.
Glad you like it. I take it you have a passing interest in Linux. Would you like to join The Answer Gang and see questions as they are received throughout the month, and help us hash out answers to them?
(This model won't scale past a couple of dozen gang members --- but we're O.K for now).
Actually, getting folks their answers individually scales great! We get a lot more people their answers than we used to. But I'd need an Editor Gang after a while. -- Heather
Anyhow, in reference to one of the questions asked about a firewall (Firewall for a SOHO From Tom Bynum), you suggested a 3 legged Linux box to do his routing / Firewalling. There is a free router / firewall called FreeSCo (stands for FREE ciSCO) (https://www.freesco.org) that is essentially a firewall on a floppy, with support for a DMZ. I uses (I believe) masq and IPChains. Runs a mimumum of services, etc. You most likely already knew about it, but I thought I'd pass this along (since the guy lives by your mom and all). Have a good 'un.
-Ray
I'd heard of FreeSCO and read a bit of their material over a year ago. I have to say that (reviewing their new site now) they seem of have come a long way. I'm also familiar with LRP (Linux Router Project) and it's derivative, Coyote --- which are listed on the the distributions pages at Linux Weekly News (https://www.lwn.net)
I hadn't realized that FreeSCO was specified designed for three legged firewalls.
-- Jim Dennis
This may well be irrelevant, but I spend a lot of time swapping drives around on embedded systems, and the usual cause for the "LI" crash is that I haven't changed the system bios to match the drive currently connected.
Keep up the good work
Shane Kennedy
https://linuxgazette.net/issue62/lg_mail62.html#wanted/1
You need to be root for all of this.
Firstly, get a copy of ipmasqadm if it isn't already on the machine. Not sure?
rpm -qa | grep ipmasqadm
It's either there or it isn't. If not, RPMs are available for those who don't do source. https://rpmfind.net is your friend.
Now then, we need to make a script that runs on bootup. I generally put all my firewall rules in a file /etc/rc.d/rc.firewall. First, a bit of security:
chown root:root /etc/rc.d/rc.firewall chmod 755 /etc/rc.d/rc.firewall
My machine doesn't need this next part, but in case yours doesn't run it automatically, open up /etc/rc.d/rc.local with the text editor of your choice, and put at the bottom:
/etc/rc.d/rc.firewall
Now, on to the script itself. This only covers the portforwarding stuff, since it appears you have NAT working just fine otherwise.
See attached misc/tips/portforward.sh.txt
Hope this helps, and hope I didn't misunderstand or misread the question. Good luck. -- Brad Felmey
I had the same problem with 2 ne2000 compatible cards in the same machine - my solution (I think under RH5.2 at the time - don't know if it's still relevant) was to add the following to my conf.modules
alias eth0 ne alias eth1 ne options eth0 -o io=yxyyy irq=zz options eth1 -o io=yxyyy irq=zz
the -o was the part that took some researching
Greg Nash
Sat, 10 Feb 2001 00:00:41 +0100
Eduardo Perez (eduperez from retemail.es)
I was reading this article of your column, when an idea hit me: what about the mac address?
You can read the mac address from each card to identify them, and use that information to configure them properly (I have not tried this, as I do not have any ethernet card around here).
I hope this helps.
Hi,
I have a question of where can I get the solaris version of this binary.
This is the Linux Gazette. Unless Solaris has added Linux binary compatibility (and it might have, we dunno) we probably aren't the right place to be asking this.
We do have Linux for Sparc if you think it would help... including boxed sets from a couple of vendors.
Your cooperation will be greatly appreciated.
Art.S
- I think there's an archive of toys for Sun at:
- https://www.sunfreeware.com
...but I don't know any more about it than that. Good luck.
-- Heather Stern
Hi Matt & TAG
If you purchased the Mandrake as a packaged distro, then you should have their included books, which are a good kick off. If not look at:
https://63.209.80.231/en/72doc.php3
However there are 4 titles I have found very good for solving problems and overcoming the obstacles (sp?) of the adventure that is Linux:
The first is a good all round tour for windows savvy people. the second two are virtually the standard refernce works ( I tried several other introductory titles before 'Running Linux' but they were not as good ) and the last is a good reference to test your progress and point out areas to investigate.
Regards
Kevin Matthews
Jim,
Sorry to bother but one of your postings brought a question to my mind...
"Any directory that is SGID will automatically set the group ownership of any files created in that directory to match that of the directory. This means that your webauthors can just create or copy files into the directory and not worry about using the chgrp (or chown) commands. "
Does that further affect its subdirectories?
Regards,
Terry Lee
Yes. Creating an SGID directory under Linux will normally make that group association of the directory become the default group assigment on new files that are created thereunder (if the user making creating the files or making those directories is a member of the associated group). In addition subdirectories below that point will also "inherit" the group association and the SGID setting.
BTW, although it would be silly to create SGID directories that were world writable it does work. Users who are not members of the associated group can create files and directories but they will be associated with their primary group (as normal) and their subdirectories will not "inherit" the SGID setting).
It's really much easier to see by experimentation than to convey by explanation.
The main purpose for this behaviour is to allow users to create shared project directories. In conjunction with the umask command/setting it's possible for users ensure that the other members of their team will be able to write to selected files and directories by default.
-- Jim Dennis
Don Harvey wrote:
I am trying to setup a Linux IPChains firewall for an NT network. I can
get everything working except SMTP mail from the Internet. It stops at
the Linux box and is not forwarded to the Exchange Server. What should
I use?
Run an SMTP bastion host on your "DMZ" network to handle all mail passing in and out. Don't expose your internal "full-featured" mail server to the outside. If you have one box filling both the roles of firewall and bastion host, this will work too.
- Mick Bauer's explains in LJ:
- https://noframes.linuxjournal.com/lj-issues/issue78/4241.html
-- Don Marti
Hi Ian & TAG ,
Mandrake 7.2 has a utility to set up Internet sharing accessable via the DrakConf control panel. This would seem to be the easiest way to link the PCs to the net.
I have yet to use this myself as I am still investigating the other things included with the 7.2 distribution; however I think you will find the new DrakConf much better than the previous version, and easier to use.
I couldn't find any more detailed info.
Hope this helps
Kevin Matthews
Something like this happened to me. I solve it by downloading a newer kernel and changing the lilo.conf like you did. Im also told that you may fix this by recompiling your kernel. This happened to me with Red Hat 6.2 (which, by that way, has kernel 2.2.14) so, i dont think it is an isolated problem. Good luck, hope this could help you out.
Sat, 17 Feb 2001 05:40:07 -0500
Sean (snmjohnson from iclub.org)
Hello,
Are you remembering to run lilo after editing lilo.conf? While this may seem like a silly question, I've done this very thing more times than I like to admit.
Also, you might want to consider upgrading your kernel to either 2.2.18 or 2.4.1.
Sean
Thu, 8 Feb 2001 17:34:40 +1300
Glenn (genright from paradise.net.nz)
I could be wrong as linux newbie myself but,
In my bios (Award) there is a setting for PNP OS under the PNP/PCI page. I set this to No and had no problems with installing either windoze or linux. I beleive it forces the OS to detect the system without relying on the BIOS settings.
Good luck
This should not make any difference to memory detection - since IRQ and DMA are not involved in that process - but overall, this is a good tip that bears repeating. I've had problems with several machines, one with my own AMS TravelPro 150 laptop (Linux would not detect the ESS1688 sound card) until "Plug-and-Play-aware OS" was set to "No". In all the above cases, Windows, even though it was set up with the "PNP OS:On", had no problems with any of the installed hardware.
-- Ben Okopnik
Thu, 08 Feb 2001 17:39:21 +0100
Roman Delaveaux (Delaveaux from heagmedianet.de)
Hello Answer Gang,
probably I have the solution for Jan Jakubik with the memory problem. I was wondering when my linux-box detects only 12 MB of RAM in an 384MB-RAM-machine. I checked my BIOS-settings and disabled "Memory hole at 16MB" . Now everything is fine.
Mit freundlichen GrüΒen
Roman Delaveaux
Dan Blazek wrote:
Hi,
I think I'm running Slackware 2.2 (kernel is 2.0.27 for sure
anyway). Is there some kind of cluster or patch bundle I can download to upgrade my box. Like a single package I can install to at least jump up to slackware 3? And if there is.. can you please tell me where to find it, and if there is there a special way to install it? Or am I going to be stuck installing a new image?
I thought there wasn't one, but rarely say so without looking. And what do you know, I found:
- slackUp - The Slackware Auto-Upgrade Utility
- https://xfactor.itec.yorku.ca/~xconsole/download.html
You should read its readme yourself, to check that it can handle your version. If it can't. get involved with the authors ... they haven't updated it in almost a year (or at least the webpage) and you may spark an entirely new round of development for the project.
-- Heather
Thanks, Dan.
Chad Whitten wrote:
trying to get the script you put on linuxgazette.com to work on my linksys dsl/cable router
lynx -auth=\ :admin https://10.1.1.10/Status.htm -dump
when i do this, it doesnt connect i have a username/password for the linksys and i tried putting in
lynx -auth=admin:password https://...etc
per the man page for lynx but still get same error message:
Sending HTTP request. HTTP request sent; waiting for response. Alert!: Access without authorization denied -- retrying Retrying with access authorization information. Looking up 10.1.1.10. Making HTTP connection to 10.1.1.10. Sending HTTP request. HTTP request sent; waiting for response. Alert!: Can't retry with authorization! Contact the server's WebMaster. Can't Access `https://10.1.1.10/Status.htm' Alert!: Unable to access document. lynx: Can't access startfile
after some playing around, i got it with
lynx -auth=\ 'admin\:password' https://10.1.1.10/Status.htm -dump
Yep, those single quotes are really handy for preventing the shell from running off with your colons, alright. -- Heather
Had this problem myself when I partitioned my drive for Linux (fips). It's caused because doze uses its own timings for each drive and is stored in the IDE controler driver in your system / control panel - it assumes that the physical drive will never be paritioned so it never checks to see if the logical size has changed.
Just remove this from Control Panel prior to a Linux installation / re-partitioning - next time windows loads it will re-discover your IDE controller and install the relevant drivers - no more problem.
Hope this helps
Simon
Well after several serious skirmishes MS-stupidity lost today! It turns out that the new FSF/GNU parted (use freshmeat.net...) does a better quicker job of shrinking both file system (FAT32 in my case) and partition the FIPS, and all the MS-shit tools!
Note though that this is Mondays release of parted, but it works and quite cleanly. It's not a real end user tool, but it got the job done.
Yea.
So now I have RedHat-7.0 installing on my new laptop, it should be a very cool toy. Thanks for the support of just being there.
Jim, you might want to point out in Answer Guy that FIPS is dated, that most folks don't know what they are talking about and that parted soves the problem quite nicely.
Later.
||ugh
Okay. I've copied TAG on this reply. I haven't played with parted. However, I haven't been running Linux on mixed system recently either. All of my recent system have been pure Linux (or non-PC's).
I also haven't noticed any recent questions for which "FIPS" would have been an answer. So any old TAG issues that referred to FIPS are probably also quite dated.
-- Jim Dennis