• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

pam_mount mountet nicht

Hallo!
Ich habe mir eine verschlüsselte Partition (LUKS) angelegt und möchte sie per pam_mount beim login automatisch einbinden lassen. Für die Konfiguration bin ich nach der ct 11/2006 vorgegangen. Nur leider bindet er die Partition nach dem Login nicht ein. Händisch auf der Konsole klappt es aber. ich ahbe folgende Fehlermeldung von pam_mount gefunden:

Feb 22 13:12:39 michael login[4241]: pam_mount(readconfig.c:418) checking sanity of volume record (/dev/hda8)
Feb 22 13:12:39 michael login[4241]: pam_mount(pam_mount.c:474) about to perform mount operations
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:368) information for mount:
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:369) ----------------------
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:370) (defined by globalconf)
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:373) user: michael
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:374) server:
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:375) volume: /dev/hda8
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:376) mountpoint: /mnt
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:377) options:
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:378) fs_key_cipher:
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:379) fs_key_path:
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:380) use_fstab: 0
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:381) ----------------------
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:177) realpath of volume "/mnt" is "/mnt"
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:182) checking to see if /dev/mapper/_dev_hda8 is already mounted at /mnt
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:799) checking for encrypted filesystem key configuration
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:819) about to start building mount command
Feb 22 13:12:39 michael login[4241]: pam_mount(misc.c:264) command: /sbin/umount.crypt [/mnt]
Feb 22 13:12:39 michael login[5217]: pam_mount(misc.c:341) set_myuid(pre): real uid/gid=0:0, effective uid/gid=0:0
Feb 22 13:12:39 michael login[5217]: pam_mount(misc.c:376) set_myuid(post): real uid/gid=0:0, effective uid/gid=0:0
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:851) mount errors (should be empty):
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:100) pam_mount(misc.c:341) set_myuid(pre): real uid/gid=0:0, effective uid/gid=0:0
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:100) pam_mount(misc.c:376) set_myuid(post): real uid/gid=0:0, effective uid/gid=0:0
Feb 22 13:12:39 michael login[4241]: pam_mount(mount.c:854) waiting for mount
Feb 22 13:12:39 michael login[4241]: pam_mount(pam_mount.c:478) mount of /dev/hda8 failed
Feb 22 13:12:39 michael login[4241]: pam_mount(pam_mount.c:123) clean system authtok (0)
Feb 22 13:12:39 michael login[4241]: pam_mount(misc.c:264) command: /usr/sbin/pmvarrun [-u] [michael] [-o] [1]
Feb 22 13:12:39 michael login[5226]: pam_mount(misc.c:341) set_myuid(pre): real uid/gid=0:0, effective uid/gid=0:0
Feb 22 13:12:39 michael login[5226]: pam_mount(misc.c:376) set_myuid(post): real uid/gid=0:0, effective uid/gid=0:0
Feb 22 13:12:39 michael login[4241]: pam_mount(pam_mount.c:360) pmvarrun says login count is 2
Feb 22 13:12:39 michael login[4241]: pam_mount(pam_mount.c:491) done opening session

Weiß jemand Rat?
Könnte es ein, das ich als einfacher User Zugriff auf /sbin/mount.crypt, /sbin/umount.crypt benötige?
 
wenn ich mich auf der Konsole anmelde (STRG+ALT+F1) sieht die Ausgabe von pam-Mount etwas anders aus. Besonders die Zeile

Could not map /mnt to a DM device
taucht dort zusätzlich auf.

Liegt das vielleicht an der /etc/pam.d/kdm, die bei mir nicht existierte? Die Datei habe ich dann mit dem Inhalt vom xdm angelegt und entsprechend die letzten 2 Zeilen ergänzt:

#%PAM-1.0
auth include common-auth
account include common-account
password include common-password
session required pam_loginuid.so
session include common-session
session required pam_resmgr.so
auth optional pam_mount.so use_first_pass
session optional pam_mount.so use_first_pass

Fehlt da noch ein Eintrag?
 
es hat lang gedauert, aber nun habe ich den Fehler gefunden - ein vergessener Buchstabe in der /etc/security/pam_mount.conf

cryptmount /sbin/mount.crypt %(VOLUME) %(MNTPT) "%(before=\"-o\" OPTIONS)"
cryptumount /sbin/umount.crypt %(MNTPT)

Jetzt läufst wie gewünscht!
 
Abgesehen davon, dass es eine Konfigurationsvariable "cryptumount" nicht gibt (und diese folglich ignoriert wird), joa :)
 
Stimmt! Da gibt er eine kleine Fehlermeldung im log.
Aber wieso steht es dann bei

http://www.barbarakaemper.de/krypto/daten_verschluesseln_dm-crypt_5b.htm

und in der ct???
 
"cryptumount" hat es nie gegeben. Ich weiß das, weil ich es nie im (Original-)Quellcode (=.tar.bz2) gesehen, eingebaut, oder rausgerissen habe. So erfährt man zumindest, dass nicht nachgeprüft wird, was in manchen Artikeln geschrieben/behauptet wird. :?
http://sf.net/mailarchive/forum.php?thread_id=30824672&forum_id=47022
 
das so ein Fehler auch der ct passiert ....

also sollte ich die Zeile

cryptmount /bin/mount -t crypt "%(before=\"-o\" OPTIONS)" %(VOLUME) %(MNTPT)

durch die zwei Zeilen

cryptmount /sbin/mount.crypt %(VOLUME) %(MNTPT) "%(before=\"-o\" OPTIONS)"
cryptumount /sbin/umount.crypt %(MNTPT)

nicht ersetzen (wie es überall steht) und LUKS funktioniert trotzdem?
 
newbie1976 schrieb:
das so ein Fehler auch der ct passiert ....
Ja das kommt wenn man einfach im Internet Plagiate abzieht.
Code:
cryptmount /bin/mount -t crypt "%(before="-o" OPTIONS)" %(VOLUME) %(MNTPT)
und
Code:
cryptmount /sbin/mount.crypt %(VOLUME) %(MNTPT) "%(before="-o" OPTIONS)"
sind equivalent. Denn /bin/mount ruft /sbin/mount.FSTYPE auf, wenn es letzteres gibt.
 
Oben