Subject: running netatalk as non-root?

From: Nicholas Riley <[email-masked]>
Date: Wed, 19 Jan 2000 18:48:00 -0500

Hi,

I've finally got a Linux box on my desk (yay!) but unfortunately I
don't have root on it.  I'm trying to install netatalk, in particular
afpd.  The last version I installed was a while ago, and so I don't
have a lot of experience to go on.  I compiled OpenSSL (for DHX
support) and netatalk pre-asun2.1.4-37b without problems, and
installed in /stuff/netatalk.  My afpd.conf is:

- -noddp -port 5480 -uamlist uams_clrtxt.so,uams_dhx.so -P /stuff/netatalk/etc/afpd.pid

I have tried it with a uams_clrtxt.so alone, uams_dhx.so, and
uams_randnum.so (with an ~/.passwd file).

With the first two, I just get "password incorrect" no matter what
password I type.  With the randnum UAM, if I type the correct
password, AppleShare says "The attempted connection to the server has
failed. Try again later." afpd prints:

12 06 41 46 50 32 2E 32 16 32 2D 57 61 79 20 52         ..AFP2.2.2-Way R
61 6E 64 6E 75 6D 20 65 78 63 68 61 6E 67 65 0E         andnum exchange.
4E 69 63 68 6F 6C 61 73 20 52 69 6C 65 79               Nicholas Riley  
(end)
reply: -5001, 2
07 48 71 21 F4 1B B3 F7 69 BB                           .Hq!....i.      
(end)
command: 19
13 00 07 48 A6 7B 76 F7 93 D4 3E 04 2E D4 68 70         ...H.{v...>...hp
7B 14 A9 14                                             {...            
(end)

(the password is "testing" if it helps, and no that's not my login
password :-)

The server is running RedHat 6.1, kernel 2.2.12 SMP.  Authentication
is via NIS.  Client is AppleShare 3.8.5 on Mac OS 8.6, which has had
no trouble connecting to other AFP/IP servers using DHX,
e.g. idisk.mac.com.

So is it at all possible to run netatalk as a non-root user?  It's
fine if I have to resort to a ~/.passwd file, I just want to be able
to see my own files from the Mac.

Thanks,

-- 
Nicholas Riley <[email-masked]>

---

From: Nicholas Riley <[email-masked]>
Date: Sat, 22 Jan 2000 02:13:48 -0500

> don't have root on it.  I'm trying to install netatalk, in particular
[snip]
> to see my own files from the Mac.

Well, I guess ignoring me is about the same as suggesting "RTFM", so I
finally found a reference to this feature while attempting to debug
the problem. In particular, the "ChangeLog" file mentions:

1998-07-20  a sun  <[email-masked]>

        * etc/afpd/auth.c (login): added a -DRUN_AS_USER #define so that
        it's simple to run the server process as a non-root user.

I also yanked a syslog replacement out of the Qi source, that lets me
log to a file since I don't have access to the real syslog on this
machine.

Hopefully this will help someone else out there.  I wasn't able to get
standard password support working either, but it does work fine now
with rand2num and ~/.passwd.

Significantly happier now,