Hello, 

I having trouble migrating a qpopper server from a Solaris machine to a
Linux machine.  Specifically, I run APOP as the preferred authentication
on this server, and need to move the /etc/pop.auth file to the Linux
machine. (I would prefer not to force 180+ users to get new passwords.)

If I merely copy the pop.auth file to the new machine and set permissions
up properly, I am unable to read the database:

% ls -l /etc/pop.auth /usr/local/sbin/popauth
-rw-------    1 pop      pop         15178 Jun  7 13:53 /etc/pop.auth
-rwsr-xr-x    1 pop      pop         26620 Jun  4 17:55 /usr/local/sbin/popauth
% popauth -list ALL
popauth: unable to open POP authentication DB /etc/pop.auth:
        Success (0) [1020]

Now, looking at the source code (and hacking it a bit to find which of the
six occurrences of the error message it was), I find that it is dying at line
1019 of popper/popauth.c  (qpopper version 4.0.3) :

#ifdef GDBM
    db = gdbm_open ( auth_file, 512, GDBM_READER, 0, 0 );
    if ( db == NULL)
       adios ( HERE, "unable to open POP authentication DB %s:\n\t%s (%i) [%i]",
                auth_file, strerror(errno), errno, __LINE__ );

If I do "popauth -init" then everything works fine. However I am
specifically trying to avoid that initialization!

Now, since I am going from a big-endian Sun to a little-endian Intel box,
I figured I might have byte-swapping issues to deal with. But it appears
to be a but more subtle than that. Indeed the first few bytes at the very
beginning of the file (a GDBM header of some sort, I assume) are swapped:

Solaris:                  Linux:
13579ace                  ce9a5713
that is,
(13)(57)(9a)(ce)          (ce)(9a)(57(13)

However, when one gets to the parts of the file where the username and
password are stored, things are not byte swapped at all. One can see the
ASCII representation of the username followed by the encoded password, and
it is the same on both platforms.  (I am examining this with "xdump", a sample
program from the 1st edition Llama Book (Learning Perl), which formats the
data in a way similar to combining "od -c" and "od -b".)

MY QUESTION:
Has anyone done this sort of migration or does anyone have advice or
sample code? Thanks very much in advance.

        David

P.S. Last year I migrated from SunOS to Solaris for which I had to put
together a small perl script to convert from an NDBM file to a GDBM file
for the /etc/pop.auth file. It worked fine and I did not have to recreate
the APOP database. Now, that did not cross computer architecture
boundaries, but it does show that at least some conversions are possible.

P.P.S. My apologies if this has already been covered, but the list archive
does not appear to be searchable.

+---------------------------------------------------------------------------+
| David Friedlander / SSAI / Code 664               [EMAIL PROTECTED] |
| Principal System Administrator          http://lheawww.gsfc.nasa.gov/~dpf |
| Laboratory for High Energy Astrophysics (LHEA)                            |
| NASA/ Goddard Space Flight Center, Greenbelt, MD  20771    (301) 286-1129 |
+---------------------------------------------------------------------------+

Reply via email to