Unix Edition
Dec. 13, 1999
_______________________________________________________________________
See the Happy Hacker web site at http://www.happyhacker.org
URL of the Week:
http://micq.chatzone.org - Micq-the original (and smallest) ICQ
clone for
Linux
_______________________________________________________________________
***********************************************************************
*** Editor's Comments
***********************************************************************
Well, here we are again. Since I now know that most of you
did not get my
first edition, and since it had some interesting stuff it in,
so I'm going to
combine it with the questions I've received in the past couple
of days, and
get this out to everyone as fast as possible.
[From my first digest]
My name is Mike Miller, and as the new Editor, I hope to publish
this digest
at least once per week, perhaps more, depending on incoming mail
volume and/or
my schedule. I look forward to editing this digest, and I hope
to hear from
many of you (not including flames... don't waste your time or
mine) soon.
A little bit about me. I'm a college sophomore, currently
working on my BS
degree in Computer Engineering in New York City. I am a hacker;
I am not a
criminal. I've worked for both private companies and the US Government,
including two military research labs. At last count, I am tridecalingual
(say
that ten times fast) in computers (i.e., I can program in 13
languages). I
currently administer my own Unix box in my apartment; it's an
AMD K6/III-450
running Debian GNU/Linux 2.1. Hopefully, sometime in the _very_
near future
I'll write some more about that... put in my plug for Debian
as the Linux
system of choice.
As I'm sure you know, this Digest is for all flavors of Unix.
Linux (all
distribution), FreeBSD, OpenBSD, Solaris, whatever... your questions
are
welcome. If you want to write up a little mini-article about
a feature of Unix
you find really useful/cool, please send it in. If you're unsure
about how to
accomplish a certain goal, ask. If you want me to tell you how
to break into
other machines, go away.
One final thing... if you send in a question, please give
as much info as
possible about your system: type of Unix, version, any weird
software you may
have running, etc.
***********************************************************************
*** Readers' Submissions
***********************************************************************
Fox Curry (curry7_98@yahoo.com) asks,
Dear sir,
I have a ncr machine in my office but I forgot the
root passwd. I think there is no method except I can
crash it, so, I searched some URLs, but no way is
found to help me.
would you like to help me to do it or give me some
suggestions to crash it?
the following is needed, if you have interest to
do it:
>uname -a
UNIX_SV virgo 4.0 3.0 3435 Pentium(TM)-MCA
the OS version is: MP-RAS 3.0.1
[Editor: Well, the simplest way I know to crash a machine
is to push the reset
button... if it really is in your office, that is. If it's not,
and you can't
physically get to the console... well... maybe you shouldn't
really be messing
with it, eh?]
-----------------------------------------------------------------------
Ron Folkers (FOLKERRE@worldnet.att.net) reminds us,
I was going thew your web page and i came accross where to
get Linux
http://www.happyhacker.org/software.html. You said you can download
it for
free or buy the cd.. Last time i checked to buy the cd costs
40$ or more...
I got Linux for 4$ and there's plenty more where that came from...
I got it
from www.ebay.com. As you know the account is free. Even tho
some of the
auction sellers sell CD-R versions but what the hey it's still
Linux..Is it
not? FreeBSD is also being sold for perty much the same price..
When I was biddin on Linux. I e-mailed the guy and asked him
if i could also
get FreeBSD with little more charge fee for cd-r and shipping
and all but
hey i saved over 70$... Just thought you'd like to put this up
on your
web. So we get even more Linux hackers out there..
[Editor: Not much to say about this... just a good idea.]
-----------------------------------------------------------------------
John Archie (johnarchie@emeraldis.com) wrote
[In re: the negative ports question]
I have a friend who claims to be able to run a daemon on a
negative port,
but since UDP & TCP packets have only 16 bits for the port
number and no bit
for a sign, the protocol does not allow negative numbers. Likewise,
only 32
bits are used for IP address and no bit regarding the sign in
the IP header.
(A diagram of the packet structure is attached.)
A sniffer reveals normal (positive) port numbers for the packets
going
to/from negative ports. I think you are right in guessing that
there is
some sort of complement system going on. Or perhaps the first
bit is used
to declare a signed/unsigned value and the remaining 15 bits
are used for
the number. Either way the negative number MUST be transmitted
as 16 bits
(regarded as positive numbers by every program I have seen).
So I don't
think negative ports could be used to bypass a scanner/detector.
--John
--diagrams--
IP Packet:
1 10 20 30
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version|Hdr Len| TOS | Total Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identification |Flags| Fragmentation Offset |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TTL | Protocol | Header Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source IP Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination IP Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options (if any) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Data |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
UDP Packet:
1 10 20 30
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port Number | Destination Port Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| UDP Length | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Data |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
TCP Packet:
1 10 20 30
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port Number | Destination Port Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Acknowledgement Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Hdr Len| Reserved |U|A|P|R|S|F| Window Size |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | Urgent Pointer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options (if any) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Data |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
[Editor: I wish I could've drawn that :). Thanks a lot, John!]
-----------------------------------------------------------------------
Eugene Cheipesh eugene@wallstreetnet.com) adds:
Hello,
I am writing in resonce to one of the questions in your digest,
specificly the
one about negative port scanning. I do not mean to sound stupid
either. But I
am under impression that in TCP header port is a 16 bit value.
While it is
possible to treat that as a huge integer, doing so would be in
violation of
the existing standard and the numbers that you think you are
using would not
corespond to where they are actually going to. To the best of
my knowalge all
operating systems treat port as a Long data type. In sort, if
negative port
scanning by some mirricle is not imposibly, it is completly pointless.
Love [sic],
Eugene
-----------------------------------------------------------------------
Mellen (karel.mellen@ping.be) asks,
This is the problem:
I'm a student and my neigbour shares his internetnet cable connection
with me.
We use Wingate and it's working fine.
But I'm thinking of reinstalling my Linux OS. He doesn't have
a Unix based OS,
only windows....
Is it possible to get acces to the net connecting with my Linux
to his Win98
computer?
Thx
Karel
[Editor: With Wingate you should have no problems. Read the
HOWTO on setting
up a proxy (the client part), and it will explain everything.
As an aside,
does anyone have any experience with Windows 98 Connection Sharing
(the built
in one)?]
-----------------------------------------------------------------------
CoLdsLiMe@aol.com asks,
when ever i use the netstat command i get this:
input (1e0) output input
(Total) output
packets errs packets errs coll packets errs packets
errs colls
then after that there are all these numbers with 0 & also
sometimes 41 at the
end of
the #'s and and then it keeps on putting out #'s that end
woth 0 under the
#'s that are
under packets. What is this and what does it mean
[Editor: I'm not exactly sure what you're asking... are you
wondering what the
output means, or why there are so many 0's, or why some numbers
end in
41...? I'll summarize briefly what the output means, but I can
say right now
that I've never seen this 41 thing before. On my machine (at
least one of
them, which happens to be running AIX), the command 'netstat
-i 1' gives
the following output
$ netstat -i 1
input (en0) output input (Total) output
packets errs packets errs colls packets errs packets errs colls
52920114 0 43417975 0 0 59250956 0 49759326 0 0
after 1 second (the final parameter), it displays
96 0 74 0 0 194 0 172 0 0
and then,
92 0 81 0 0 140 0 129 0 0
and so on. I presume this was approximetly what you typed
(although you
typed -i <some other number> probably). I assume you're
basically
familiar with what netstat -i does, namely, reports input and
output for your
network interfaces. The first two top headings (input and output)
are for
interface 1e0 (the default interface) on your machine (en0 in
my example). I'm
guessing 1e0 is an ethernet interface, but that's just a guess.
The next set
is the total for _all_ interfaces. For each 'category', there
are several data
items shown, namely, input packets, input errors, output packets,
output
errors, and output collisions. The packet column lists the total
number of
packets being sent in or out on that connections; errs is the
number of errors
that occur. The colls column indicates how many collisions occured.
A
collision, (parenthetically, this is not an issue with a point-to-point
connection like SLIP, PPP, or ATM), occurs when too many packets
are being
sent out on the network. As a rule of thumb, if the number of
collisions is
less than 5% of your total traffic, you're probabaly OK. Anyway,
I think that
should explain it... if anyone has anything to add, or if I missed
something,
please send it in.]
-----------------------------------------------------------------------
gip (gipbrown@yahoo.com) explains:
hey - for the guy who was asking about running linux and windows
on the same box - check out VMWare - cool app that lets you run
both os at the same time - and toggle back and forth between
them - and it's either free or costs damn near nothing - I'm
running it at this very moment - it's a little memory intensive
- 128MB min and I suggest 256MB - but its good enough till you
finally trash windows and go linux full time.
Bernie Brown
[Editor: I don't know if I'd call a 256MB memory hog "free"...]
-----------------------------------------------------------------------
Roger A Prata (rprata@prodigy.net) wants to know:
Hey there.. I have an issue with Procmail myself. I consider
myself a Linux
power-user.. until recently, I had a fairly complex Linux setup
(Samba
shares, NFS shares, HTTP/FTP, etc. And I was running Procmail,
filtering my
mail, reading it with Pine. This was the ONLY mail software that
I used.
It was ideal, because I was able to SSH into my box from home,
and
send/receive mail as if I was in the office. I recently got a
new PC, and
decided to reinstall Linux rather than using my existing hard
drive. I
installed a fresh Linux from my Mandrake CD (The same distro/CD
that I used
last time) and started customizing it. Last time, to get Procmail
to work,
all I had to do was write a .procmailrc, and the individual .rc
files for
the recipes (there were 2). Procmail kicked in and did the rest
once the
.procmailrc was created and in my home dir. Not this time, something
must
be different because Procmail doesn't work, and if I use a .forward,
all the
mail sent to me bounces, sendmail complaining about the exec
line. I'm
running VMWARE, with Windoze running in a virtual machine, but
that
shouldn't effect Procmail at all.. any ideas?
-R
[Editor: In order for procmail to work without a forward file,
it must be
configured as your MDA. As you write, when running sendmail,
you need a
.forward file. Without knowing what your forward file is, I can't
really help
you... did you try all options in the procmail man page? If you
email me your
.forward, we can try and help out... you can also try sending
a test message
to procmail without going through SMTP by just piping it the
procmail exec...
that will tell you if the problem is the routing, or the processing.]
-----------------------------------------------------------------------
Punit Shah (punits@hotmail.com) inquires:
Hi!
I am a recent Graduate, I am good at software programming
but not
much I know. I know Foxpro and little about C but that was again
four years
ago............
Anyway I am beginner for UNIX and Linux I wanna learn these
languages but do I
have to know Unix or C for Starting Linux.........
Please Let me know it would be an great help
Bye.....
PUNIT
[Editor: To use *nix, you do not need to know C. But if you
want to actually
do anything, it's a great idea. Polish up on your C before you
try to
administer a system (including a home machine), because you'll
need it to
effectively apply patches and install new programs from source
code. C also
helps if you use the C-shell, or if you want to learn a language
like Perl.]
More --->>