Hi!

Hier kommt ein _wirklich_ schwieriger Fall. :-(

Ich habe zwei FreeBSD-Installationen, auf denen SSH 1.2.27 läuft/lief. Aus
gegebenem Anlaß *müssen* diese beiden Dinger nun auf OpenSSH 2.3 migriert
werden.

Um auf den Punkt zu kommen: Ich krieg es nicht gebacken.

OpenSSL ist schon installiert, das war der einfache Teil der Übung.

Mein Problem bei OpenSSH scheint zu sein, daß ich PAM nicht verstehe und
auch wirklich gewaltigen Respekt davor habe. Wenn ich das richtig sehe,
kann das Verknorzen meiner PAM-Konfiguration dazu führen, daß ich mich
überhaupt nicht mehr anmelden kann.

Wenn ich OpenSSH einfach mal standardmäßig übersetze und installiere, werde
ich beim Anmelden auf der Maschine erstmal nach meinem RSA-Mantra gefragt,
dann nach meinem Unix-Kennwort, und dann kommt "Permission denied". Sieht
nicht gut aus...

In INSTALL von OpenSSH steht:

    If you are using PAM, you will need to manually install a PAM
    control file as "/etc/pam.d/sshd" (or wherever your system
    prefers to keep them). A generic PAM configuration is included as
    "contrib/sshd.pam.generic", you may need to edit it before using it on
    your system. If you are using a recent version of Redhat Linux, the
    config file in contrib/redhat/sshd.pam should be more useful. 
    Failure to install a valid PAM file may result in an inability to
    use password authentication.

Klingt erschreckend. Ich habe dann mal contrib/sshd.pam.freebsd an die
/etc/pam.conf angehängt, ohne Erfolg. In /var/log/messages steht:

Feb 10 04:44:31 foo sshd[14286]: adding faulty module: /usr/lib/pam_unix.so
Feb 10 04:45:33 foo sshd[14330]: unable to dlopen(/usr/lib/pam_unix.so)
Feb 10 04:45:33 foo sshd[14330]: [dlerror: /usr/lib/pam_unix.so: Undefined symbol 
"crypt"]

Die sshd.pam.freebsd sieht so aus:

sshd    auth      required  pam_unix.so    try_first_pass
sshd    account   required  pam_unix.so
sshd    password  required  pam_permit.so
sshd    session   required  pam_permit.so

In pam(8) steht:

       The principal feature of the  PAM  approach  is  that  the
       nature  of the authentication is dynamically configurable.
       In other words, the system administrator is free to choose
       how individual service-providing applications will authen-
       ticate users. This dynamic configuration  is  set  by  the
       contents    of   the   single   PAM   configuration   file
       /etc/pam.conf.  Alternatively, the  configuration  can  be
       set  by  individual  configuration  files  located  in the
       /etc/pam.d/ directory.  The  presence  of  this  directory
       will cause PAM to ignore /etc/pam.conf.

Was hat es mit diesem /etc/pam.d genau auf sich? Kann ich halbwegs
risikolos von /etc/pam.conf darauf umstellen? Die Kiste steht in Übersee,
aber ich könnte das im Fehlerfall über AT-Jobs rückgängig machen.

Und was genau hat es mit dieser pam_unix.so auf sich?

Vielleicht hat ja jemand von euch eine Idee? Ich knorze hier seit 3 Stunden
rum und bin völlig ratlos. :-(

Über einen "verschobenen" Telnet-Daemon und eine Kiste, die daneben steht,
komme ich problemlos an die Maschine ran, jedenfalls solange PAM mich nicht
im Stich läßt.

Und bevor mir jetzt jemand empfiehlt, den FreeBSD-Port zu benutzen: Den
gibt es nicht. FreeBSD hat nur einen Port von OpenSSH 2.2 zu bieten. Ich
könnte kotzen. Auf Debian hat das Upgrade genau 30 Sekunden gedauert.

Wäre schön, wenn mich jemand von euch in dieser Angelegenheit weiterbringen
könnte.

Ciao,

-martin

-- 
If you push the "extra ice" button on the soft drink vending machine,
you won't get any ice.  If you push the "no ice" button, you'll get
ice, but no cup.
---------------------------------------------------------------------------
PUG - Penguin User Group Wiesbaden - http://www.pug.org

Antwort per Email an