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

Verschlüsselte Partition wird nicht automatisch ausgehangen

lOtz1009

Moderator
Teammitglied
...und zwar wenn ich das mit pam_mount verwalte.
Versionen von PAM und Kernel siehe unter http://www.linux-club.de/viewtopic.php?f=4&t=109835 (handelt sich um das selbe System).

Vorgehen (z.B.)
Login als Root auf tty1
Code:
Jun 11 18:38:29 northwood login[3544]: pam_mount(pam_mount.c:364): pam_mount 2.3: entering auth stage
Jun 11 18:38:30 northwood login[3544]: pam_mount(pam_mount.c:553): pam_mount 2.3: entering session stage
Jun 11 18:38:30 northwood login[3544]: pam_mount(misc.c:38): Session open: (uid=0, euid=0, gid=0, egid=0)
Jun 11 18:38:30 northwood login[3544]: pam_mount(mount.c:196): Mount info: globalconf, user=root <volume fstype="crypt" server="(null)" path="/dev/disk/by-id/ata-WDC_WD800BB-32FJA0_WD-WCAJ91265626-part1" mountpoint="/home" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="" /> fstab=0
Jun 11 18:38:30 northwood login[3544]: command: 'mount.crypt' '/dev/disk/by-id/ata-WDC_WD800BB-32FJA0_WD-WCAJ91265626-part1' '/home' 
Jun 11 18:38:30 northwood login[3576]: pam_mount(misc.c:38): set_myuid<pre>: (uid=0, euid=0, gid=0, egid=0)
Jun 11 18:38:30 northwood login[3576]: pam_mount(misc.c:38): set_myuid<post>: (uid=0, euid=0, gid=0, egid=0)
Jun 11 18:38:31 northwood modprobe: FATAL: Error inserting padlock_sha (/lib/modules/2.6.33.5-jng105-rt/kernel/drivers/crypto/padlock-sha.ko): No such device
Jun 11 18:38:31 northwood kernel: [   62.962493] padlock: VIA PadLock Hash Engine not detected.
Jun 11 18:38:32 northwood kernel: [   63.464125] EXT4-fs (dm-0): recovery complete
Jun 11 18:38:32 northwood kernel: [   63.487300] EXT4-fs (dm-0): mounted filesystem with ordered data mode
Jun 11 18:38:32 northwood login[3544]: command: 'pmvarrun' '-u' 'root' '-o' '1' 
Jun 11 18:38:32 northwood login[3658]: pam_mount(misc.c:38): set_myuid<pre>: (uid=0, euid=0, gid=0, egid=0)
Jun 11 18:38:32 northwood login[3658]: pam_mount(misc.c:38): set_myuid<post>: (uid=0, euid=0, gid=0, egid=0)
Jun 11 18:38:32 northwood login[3544]: pam_mount(pam_mount.c:440): pmvarrun says login count is 1
Jun 11 18:38:32 northwood login[3544]: pam_mount(pam_mount.c:643): done opening session (ret=0)
also verschlüsselte /home-Partition eingebunden.

Beim Logout:
Code:
Jun 11 18:49:01 northwood login[3544]: pam_mount(pam_mount.c:691): received order to close things
Jun 11 18:49:01 northwood login[3544]: pam_mount(misc.c:38): Session close: (uid=0, euid=0, gid=0, egid=0)
Jun 11 18:49:01 northwood login[3544]: command: 'pmvarrun' '-u' 'root' '-o' '-1' 
Jun 11 18:49:01 northwood login[24371]: pam_mount(misc.c:38): set_myuid<pre>: (uid=0, euid=0, gid=0, egid=0)
Jun 11 18:49:01 northwood login[24371]: pam_mount(misc.c:38): set_myuid<post>: (uid=0, euid=0, gid=0, egid=0)
Jun 11 18:49:01 northwood login[3544]: pam_mount(pam_mount.c:440): pmvarrun says login count is 1
Jun 11 18:49:01 northwood login[3544]: pam_mount(pam_mount.c:720): root seems to have other remaining open sessions
Jun 11 18:49:01 northwood login[3544]: pam_mount(pam_mount.c:728): pam_mount execution complete
Jun 11 18:49:01 northwood login[3544]: pam_mount(pam_mount.c:115): Clean global config (0)
Jun 11 18:49:01 northwood login[3544]: pam_mount(pam_mount.c:132): clean system authtok=0x8d9c7c8 (0)
und anschließendem Login im kdm
Code:
Jun 11 18:50:41 northwood kdm: :0[2863]: pam_mount(pam_mount.c:364): pam_mount 2.3: entering auth stage
Jun 11 18:50:41 northwood kdm: :0[2863]: pam_mount(pam_mount.c:553): pam_mount 2.3: entering session stage
Jun 11 18:50:41 northwood kdm: :0[2863]: pam_mount(misc.c:38): Session open: (uid=0, euid=0, gid=100, egid=100)
Jun 11 18:50:41 northwood kdm: :0[2863]: pam_mount(mount.c:196): Mount info: globalconf, user=XXXX <volume fstype="crypt" server="(null)" path="/dev/disk/by-id/ata-WDC_WD800BB-32FJA0_WD-WCAJ91265626-part1" mountpoint="/home" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="" /> fstab=0
Jun 11 18:50:41 northwood kdm: :0[2863]: command: 'mount.crypt' '/dev/disk/by-id/ata-WDC_WD800BB-32FJA0_WD-WCAJ91265626-part1' '/home' 
Jun 11 18:50:41 northwood kdm: :0[24445]: pam_mount(misc.c:38): set_myuid<pre>: (uid=0, euid=0, gid=100, egid=100)
Jun 11 18:50:41 northwood kdm: :0[24445]: pam_mount(misc.c:38): set_myuid<post>: (uid=0, euid=0, gid=100, egid=100)
Jun 11 18:50:41 northwood kdm: :0[2863]: pam_mount(mount.c:64): Errors from underlying mount program:
Jun 11 18:50:41 northwood kdm: :0[2863]: pam_mount(mount.c:68): crypt_activate_by_passphrase: File exists
Jun 11 18:50:41 northwood kdm: :0[2863]: pam_mount(pam_mount.c:521): mount of /dev/disk/by-id/ata-WDC_WD800BB-32FJA0_WD-WCAJ91265626-part1 failed
Jun 11 18:50:41 northwood kdm: :0[2863]: command: 'pmvarrun' '-u' 'XXXX' '-o' '1' 
Jun 11 18:50:41 northwood kdm: :0[24450]: pam_mount(misc.c:38): set_myuid<pre>: (uid=0, euid=0, gid=100, egid=100)
Jun 11 18:50:41 northwood kdm: :0[24450]: pam_mount(misc.c:38): set_myuid<post>: (uid=0, euid=0, gid=100, egid=100)
Jun 11 18:50:41 northwood kdm: :0[2863]: pam_mount(pam_mount.c:440): pmvarrun says login count is 1
Jun 11 18:50:41 northwood kdm: :0[2863]: pam_mount(pam_mount.c:643): done opening session (ret=0)
besagt ja, dass das Volumen noch geöffnet war.
Ich befürchte beim Shutdown wird das Volume dann auch nicht komplett geschlossen bzw. ausgehangen. Schadet das dem Dateisystem? Sicherheitstechnisch habe ich eigentlich keine Bedenken, da das hier ein einzelnes Desktop-System ist, das nach dem/beim Logoff ausgeschaltet wird.

Gibt es eine saubere Möglichkeit, dass das Volumen ausgehängt wird? Wobei ich mich eh frage was Root da auf dem /home macht (aber beim Login per User gibts die selbe Meldung).
 
Oben