Subject: Authentication question

From: Lars Nummedal <[email-masked]>
Date: Thu, 20 Dec 2001 11:15:32 +0100 (CET)

Hi,

I know this is more a MacOS 9 question, but is it possible to authenticate
as more than one user against a netatalk server?

Let's say I have mounted user1's home dir as user1. Now I want to open
user2's home dir as user2 at the same time. Is this possible? When I open
the chooser and double-click on the netatalk server for the second time, I
can only log on as user1. The only choice I am presented with, is 'OK' or
'Cancel'.

Any replies/links will be greatly appreciated.

Thanks,
Lars Nummedal

---

From: Thomas Kaiser <[email-masked]>
Date: Thu, 20 Dec 2001 16:50:46 +0100

On Thu, 20 Dec 2001 11:15:32 +0100 (CET), Lars Nummedal wrote:

> user2's home dir as user2 at the same time. Is this possible?

Within AppleShare client GUI, AFAIK not.

But give this a try and

1) within MacOS 9 open your ScriptEditor:

The syntax to mount a Volume with AFPoverAppleTalk is

    mount volume "[vol]" on server "[Servername]" in AppleTalk zone ¬
        "[zone]" as user name "[user]" with password "[passwd]"

For use with AFPoverTCP you have to supply an AFP URL:

    mount volume "afp://[user]:[passwd]@[ip address]:[afp port]/[vol]"

or similar

    mount volume "afp://[ip address]:[afp port]/[vol]" ¬
        as user name "[user]" with password "[passwd]"

2) From the terminal in MacOS X the situation is different as you first have
to create a Mountpoint (eg. with "mkdir /Volumes/test")

    /sbin/mount_afp 'afp://[user]:[passwd]@[ip address]:[afp port]/[vol] \
        /Volumes/test'

If you want to do the initial connection with AppleTalk, then it will look
like:

    /sbin/mount_afp 'afp:/at/[user]:[passwd]@[Servername]:[zone]/[vol]' \
        /Volumes/test'

Note 1: Even if you want mac and server to speak via AppleTalk, the
connection will be established via AFPoverTCP, if the server supports this.
So in the latter case only the service location will be done via AppleTalk.

Note 2: Never ever use the "[user]:[passwd]@" syntax inside the Finders
"connect to server" dialog box, as this will leave some kind of alias inside
your home directory ("Library/Recent Servers/") from where both username and
passwort can be read in cleartext! Use this only on the command line...

Some remarks: 

- [ip address] can also be substituted with a FQDN that must be resolvable
  by the mac, that wants to mount the share.

- [afp port] defaults to 548 and can be omitted if the server uses this
  default port

- [zone] defaults to "*" (aka the default zone). If you have real zones than
  you should use the name of the apropriate one.

- In [vol] special characters need *not* to be quoted within an AFP URL if
  used by the ScriptEditor. But with MacOS X' CLI tool the situation is
  different: If your Volume is named "my backup" then you should substitute
  with "my%20backup" or "my\ backup"

Try this and check on the server whether different users will have an effect
or whether this will be ignored and the authentication will be done as the
first user that connected already.

Regards,

Thomas