Subject: Re: Only Guest Login with 1.4.99

From: "Luke McNeilage" <[email-masked]>
Date: Fri, 06 Oct 2000 14:03:53 +1100

Your netatalk.conf is more likely to have this:

ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`
than this:

> ATALK_NAME=<insertyourservernamehere>
>

I change the name her to look a bit more "Mac", so it certainly has no
bearing on the IP.

However, this name must be matched to your afpd.conf, or the IP won't work.\
That's a
-
for default, or the same name you replaced the 'ATALK_NAME= ' with.

>>I'm troubled here since i get my IP number from a DHCP server. It is pretty
>>stable, but can change if the netadmin wants to. Is it a good idea to add
>>the IP number here or is there any workaround?
\
> 1. If the client starts by double-clicking on the server name in the
> Chooser, the client's Mac talks to the server via DDP and asks, "Hey, are
> you on IP?
> 2. Server says "Yup."
> 3. Client asks, "What's your IP?"
> 4. Server looks in /etc/hosts, and if there's an entry matching what
> appears in ATALK_NAME=<servername>, it uses that IP and sends it back.
\

> Now here's my guess, somebody correct me if I'm wrong: If that name
> (whatever you plugged into ATALK_NAME=) isn't in /etc/hosts, but is
> defined on your DNS server, and your Linux box is configured to use that
> DNS server, I think that will work.
>
> So assuming I'm right, you'd need to have your DNS and DHCP configured so
> they coordinate the name of your machine with the assignment of the IP.
> Clear?
>
So yes Steve, I'm sorry but this bit is wrong. It calls simultaneously on
both the Atalk (Appletalk protocol) and the afpd (ASIP protocol), but if
they don't agree, you only get one or the other.

---

From: Sak Wathanasin <[email-masked]>
Date: Fri, 6 Oct 2000 13:41:36 +0100

>>  appears in ATALK_NAME=<servername>, it uses that IP and sends it back.

Close, but not quite. When you click on the server in the Chooser, 
the Mac sends an FPGetSrvrInfo request to the server. In the reply, 
the server sends its hostname, the versions of AFP that it supports, 
the UAMs that it supports, etc etc and right at the end, it sends the 
addresses it can be contacted on.

You can get the details from .../etc/afpd/status.c; the routine 
status_netaddress has the following comment:

     /* format:
        Address count (byte)
        len (byte = sizeof(length + address type + address)
        address type (byte, ip address = 0x01, ip + port = 0x02,
                            ddp address = 0x03, fqdn = 0x04)
        address (up to 254 bytes, ip = 4, ip + port = 6, ddp = 4)
        */

I.e., it sends a count of the different ways it can be contacted, and 
for each of them it sends the type (AppleTalk, IP addr or name) and 
then the respective address or name. It's up to the client what it 
does with this info: AppleShare tries the TCP connection(s?) first, 
then the AppleTalk ones.

If it is given an incorrect IP addr, the attempt to talk to ASIP will 
fail. netatalk obtains this addr using the std gethostbyname() call, 
and this will use DNS, NIS or /etc/hosts depending on your 
nsswitch.conf settings. In my case, I had an entry for my Linux box 
in my /etc/hosts that mapped it to 127.0.0.1, which of course worked 
just fine on the Linux box itself, but failed miserably when the Mac 
tried to use it. Once I fixed this, everything worked as expected.

-- 
Sak Wathanasin
Network Analysis Limited
178 Wainbody Ave South, Coventry CV3 6BX, UK

Internet: [email-masked]
Phone: (+44) 24 76 41 99 96        Mobile: (+44) 79 70 75 19 12 
Fax: (+44) 24 76 69 06 90