RE: Unix Programming Book

1998-11-17 Thread dmarsh

Um.. Well (aside from Java)

1) The K&R 'C' and 'C++' book for starters (they had a big hand in the ansi
standards)

2) Shell script programming books (ones with plenty of examples and covers
shell script security) -- KSH, BASH, TCSH, ZSH, etc... I just spotted one
the other day at B&N and flipped through it. It wasn't bad and was broken
into to parts: 1) learning  2) reference. A friend of mine was interested in
learning more about using Unix. I tend to use BASH and KSH exclusively.

3) The Unix(tm) man pages (they have a bit of documentation for system calls
and such)

Unix programming is kind of confusing -- I assume you asked your question
from a Unix administrative stand point.

If this isn't what you wanted or expected, re-post a detailed question.

--Doug

-Original Message-
From: Arnaldo Riquelme -Systems Analyst [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 16, 1998 8:55 AM
To: [EMAIL PROTECTED]
Subject: Unix Programming Book


I'm looking for good intro book on unix programming. Know anyone that
wants to sell one?
Any sugestion will be appreciated.
thanks



RE: Retrieving a fully qualified hostname under NT

1998-11-17 Thread dmarsh


The IP model will change in NT 5 (more Unix like) but the name issue will
continue to pose a problem.

Back when there was no names, each machine managed it's OWN name to ip
conversion: (aka /etc/hosts)

name servers came into play and we now have /etc/resolv.conf for unix
machines (although the history has 'yp' written all over it, change due to
the trademark or somthing, I didn't follow it back then).

SMB (NetBios) just convolutes the name model more..

What name? Netbios name, host name or DNS name?

The simple solution is to use the same name in all three cases -- Windows NT
kind of assumes you will do that as WINS resolution will give you problems
if you do not).

The order for normal IP name resolution on NT appears to be .../etc/hosts ->
WINS -> DNS.

If you make a NetBios name to IP resolution call, it goes to WINS (or who
ever is the local browse master, if no WINS server) ONLY. You can enable on
most Microsoft NBT (NetBios over TCP/IP) clients to include DNS as an
alternate method for resolution when the normal resolution fails, but this
is not enabled by default (it's labled enable DNS for WINS/Windows
Resolution). You can also manage your own WINS host list (i.e. Netbios name
to IP address resolution). The name of the file is LMHOST (which came from
the old IBM Lan Manager). The file on Win 3.x/9x is (windowsdir)\LMHOSTS.
The file on NT is not specified and you MUST point to it through the IP
setup screens. The normal location for it is
(winntdir)\system32\drivers\etc\lmhosts (which is where the other Unix like
files are also, hosts




-Original Message-
From: Christopher Hinds [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 13, 1998 10:02 AM
To: Mark Hofmann
Cc: java-linux
Subject: Re: Retrieving a fully qualified hostname under NT


Try using a reverse DNS lookup with that host's IP address , you should
get
a fully qualified host name from that. This obviously means you will
have to use the DNS protocol on an open socket. The problem with NT is
it is using
WINS ( NT DNS) to resolve the name and that name returned is a host name
known to the NT Promary Domain controller and the WINS Service.
Mark Hofmann wrote:

> Hi all,
>
> I've posted that question a few days ago to java.lang.programmer
> but got no response :-(
> But, since this problem is really bugging me, and there might be some
> people in this list that run there progs under NT and Linux, just as
> me,
> I hope to find a solution here.
> Anyway, here is the problem, easy and simple 
>
> when I use
> String
> localhostname=(InetAddress.getLocalHost()).getHostName();
> under Linux I get the fully qualified hostname, under NT just the
> local
> hostname, eg. host instead of host.my.domain.com
>
> Our admin says that its an NT feature/problem (you never know) because
> it
> stores both names separately and returns usually only the local
> hostname.
>
> Is there a workaround for that, so I can get the fully qualyfied
> hostname or
> do I just have to live with that? Or even better is our system
> misconfigured
> and I can tell our admin that he's wrong (which is always fun ;-) )
>
> Thanks in advance
>
>  Mark
>
> --
> M a r k  H o f m a n n
> Department of Computer Science
> University of Stellenbosch / South Africa
> phone: +27-82-7449880




RE: Retrieving a fully qualified hostname under NT

1998-11-17 Thread dmarsh

Oops I pressed Control-S for Send... darn it

(windowsdir)\LMHOSTS. The file on NT is not specified and you MUST point to
it through the IP setup screens. The normal location for it is
(winntdir)\system32\drivers\etc\lmhosts (which is where the other Unix like
files are also, hosts, services, protocols, etc.).

Add an entry for your IP address(s) with the FQDN to your ...\etc\hosts
under NT and the resolution should return what you expect until Unix
(linux)...


134.56.78.90  myhost.mydomain.myorg  myshortname


The first and second column are required (IP and FQDN) any addition will be
used for "short" alternative names. I use this some times.. Good example
would be

12.13.14.15  www.really.long.stupid.name.and.really.boring.com  gohere

http://gohere works just as well as http://12.13.14.15  but is easier to
remember (since we like names and this whole name thing got started).


--Doug



RE: RMI binding bug

1998-11-18 Thread dmarsh

Just a pointer:

for /etc/hosts (or the equiv in NT (windir)\system32\drivers\etc\hosts)
(assume your I/F IP is 10.12.14.16)

---
127.0.0.1   localhost
10.12.14.16 thehost.mydomain.org   mypc
---

the order is somewhat important
(ip address) (FQDN) (and short or aliases here)

If you don't have a true / valid DNS for (an assumed) you fixed IP address
then and nslookup will fail.

i.e.: (I know it's a bad use of letters with M$ and all. hee hee ;) )

% nslookup 
...
> set server (ip.address.of.server <- Not your own machine)
> set type=any
> 16.14.12.10.in-addr.arpa.
  (some error message saying doesn't exist)
   *** DNS.SERVER.whereever.org can't find 16.14.12.10.in-addr.arpa.:
Non-existent host/domain
> exit
%

You will also need to update your /etc/HOSTNAME to match your full name (not
just hostname)

/etc/HOSTNAME---
thehost.mydomain.org
end of /etc/HOSTNAME

You also need to update the IP portion of your OS with the correct host name
% /bin/hostname thehost

You may also need to stop and restart certain services, for example
sendmail: (quick and dirty)
% ps aux | grep sendmail
root73  0.0   5.2 . sendmail: accepting connections
root .. grep sendmail
% kill -9 73
% /usr/sbin/sendmail -bd -q15m


If you don't have a FQDN, make one up (I jokingly for example: nodomain.org)
and have a host of myhost.nodomain.org.


As for the Java part I cannot help you there

-Original Message-
From: Douglas T. Brown [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 18, 1998 10:56 AM
To: Java-Linux Mail List
Subject: RMI binding bug


Can someone help me out, here?  I'm sure that some of you have solved this
problem long ago. . .  In fact, there is one thread in the Java-Linux
archives
that deals
with this.  I tried putting my machine as the first line in /etc/hosts as
suggested:

xxx.xxx.x.2 MyHostName MyHostName.mydomain.com
127.0.0.1 localhost localhost.localdomain

but that didn't work.





RE: what tools do you use for programming

1998-12-16 Thread dmarsh

This is more linux and not Java (but I will respond to the group at this
information might be useful!; this also assumes x86 platform)

You can have LILO installed as the "Master Boot Record" program just fine.
When you use fdisk for cfdisk under linux, you will notice that your NTFS
partition (if you have one) will appear to be HPFS (High Performance File
System) which is non specific. OS/2 uses that partition type ID as well as
NTFS. Note, you can also use NT on top MSDOS file systems (kind of like
Linux and UMSDOS, but a bit different).

Before experimenting, first (before you mess up your current MBR) use
something like "dd" to backup your MBR:

dd if=/dev/hda of=/root/ntbootrec.mbr bs=512 count=1

Also have an emergency boot disk (have a freshly formatted disk, for 1.44,
fdformat /dev/fd0u1440)

cat /vmlinuz > /dev/fd0

(above is a quick way make your emergency boot disk, there are other ways!)

Next (I like to use the inneractive liloconfig) write a lilo.conf file that
has the following information

Start with a clear lilo.conf (option 1) flag 5 sec pause or whatever, BUT
write this test LILO to floppy disk /dev/fd0!!!
Add your Lnux partition (label someting meaningful like linux)
add your dos partion
add your ntfs/os2/hpfs partion (under liloconfig, add OS/2 partition, even
if NTFS)
write to your floppy!

shutdown linux and test boot from floppy. (i.e. leave your freshly lilo'ed
disk in drive A: /dev/fd0)

You can press TAB to see a list. Try booting to all partitions you have. 

If this lilo configuration works then the same setup will work from your
harddrive. You can VI your /etc/lilo.conf or where ever your store it and
make the quick on line change to point to /dev/hda from /dev/fd0 and run
lilo to write. You should/can also update your linux partition (root linux
ext2 partion of /dev/hda5 for example). I like to have it written to in both
locations.

If all else fails, get the most current HOW-TOs for lilo. I have an older
one printed in a great reference book. Support companies that support Linux,
but Linux related books!!!

I may have missed something as I don't do this often! ;)

-Original Message-
From: jim watson [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 12, 1998 2:36 AM
To: [EMAIL PROTECTED]
Subject: Re: what tools do you use for programming


I have NT4 and Linux on separate partitions. NT has a boot loader, which
can run msdos,  i just put a autoexec.bat file to run loadlin with the
kernel in the dos directory, and away it goes  - under this arrangement
i think NT does not have any way to even know linux is there, but it had
to be NT first? but linux can access the NT(dos) partition ok,


> You can install both OS's, but you must be careful about which
to
> install fisrt... (NT, of course, linux is a little more friendly with
> other OSs:)
>