[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Montaggio home directories da server sui client con pam_mount



Ciao,
non riesco a far montare le home directories da server debian samba-ldap sui client ubuntu al login. Ho installato pam_mount ma credo che la configurazione non sia corretta. ho bisogno che le home directory presenti nel server "amahoro" in /users/username vengano montate sui client in /home/username.

Riesco a montarle a mano da client:
mount.cifs //amahoro/users/username /home/username -o user=username
it runs.

Potreste dare un occhio alla configurazione di pam_mount.conf perfavore?

Questo è l'output dopo il login da shell con l'utente leonidas:

login:leonidas
Password:

pam_mount(rdconf1.c:699): path to luserconf set to /users/leonidas/.pam_mount.conf.xml
pam_mount(pam_mount.c:553): pam_mount 2.10: entering session stage
pam_mount(misc.c:38): Session open: (ruid/rgid=0/0, e=0/0)
pam_mount(mount.c:647): Could not get realpath of /home/leonidas: No such file or directory pam_mount(mount.c:218): Mount info: globalconf, user=leonidas <volume fstype="cifs" server="amahoro" path="users/leonidas" mountpoint="/home/leonidas" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="" /> fstab=0 ssh=0
pam_mount(mount.c:259): mkmountpoint: checking /home
pam_mount(mount.c:259): mkmountpoint: checking /home/leonidas
pam_mount(mount.c:299): mkdir[0] /home/leonidas
pam_mount(mount.c:307): chown /home/leonidas -> 2001:513
command: 'mount' '-t' 'cifs' '//amahoro/users/leonidas' '/home/leonidas' '-o' 'user=leonidas,uid=2001,gid=513'
pam_mount(spawn.c:134): setting uid to user leonidas
pam_mount(misc.c:38): set_myuid<post>: (ruid/rgid=2001/513, e=2001/513)
pam_mount(mount.c:69): Messages from underlying mount program:
pam_mount(mount.c:73): mount: only root can do that
pam_mount(misc.c:380): 14 20 0:14 / /sys rw,nosuid,nodev,noexec,relatime - sysfs sysfs rw pam_mount(misc.c:380): 15 20 0:3 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw pam_mount(misc.c:380): 16 20 0:5 / /dev rw,relatime - devtmpfs udev rw,size=1539868k,nr_inodes=212045,mode=755 pam_mount(misc.c:380): 17 16 0:11 / /dev/pts rw,nosuid,noexec,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000 pam_mount(misc.c:380): 18 20 0:15 / /run rw,nosuid,relatime - tmpfs tmpfs rw,size=618748k,mode=755 pam_mount(misc.c:380): 19 14 0:16 / /sys/fs/fuse/connections rw,relatime - fusectl fusectl rw pam_mount(misc.c:380): 20 1 8:5 / / rw,relatime - ext3 /dev/disk/by-uuid/a41c3a72-1f9f-4e93-873e-d9732f482b05 rw,errors=remount-ro,commit=5,barrier=0,data=ordered pam_mount(misc.c:380): 21 14 0:6 / /sys/kernel/debug rw,relatime - debugfs none rw pam_mount(misc.c:380): 22 14 0:10 / /sys/kernel/security rw,relatime - securityfs none rw pam_mount(misc.c:380): 23 18 0:17 / /run/lock rw,nosuid,nodev,noexec,relatime - tmpfs none rw,size=5120k pam_mount(misc.c:380): 24 18 0:18 / /run/shm rw,nosuid,nodev,relatime - tmpfs none rw pam_mount(misc.c:380): 25 15 0:19 / /proc/sys/fs/binfmt_misc rw,nosuid,nodev,noexec,relatime - binfmt_misc binfmt_misc rw pam_mount(misc.c:380): 27 20 0:20 / /home/stefano/.gvfs rw,nosuid,nodev,relatime - fuse.gvfs-fuse-daemon gvfs-fuse-daemon rw,user_id=1000,group_id=1000
pam_mount(pam_mount.c:521): mount of users/leonidas failed
command: 'pmvarrun' '-u' 'leonidas' '-o' '1'
pam_mount(misc.c:38): set_myuid<pre>: (ruid/rgid=0/0, e=0/513)
pam_mount(misc.c:38): set_myuid<post>: (ruid/rgid=0/0, e=0/513)
pmvarrun(pmvarrun.c:252): parsed count value 0
pam_mount(pam_mount.c:440): pmvarrun says login count is 1
pam_mount(pam_mount.c:645): done opening session (ret=0)
No directory, logging in with HOME=/

e questo l'output dopo il logout:

pam_mount(pam_mount.c:691): received order to close things
pam_mount(misc.c:38): Session close: (ruid/rgid=0/513, e=0/513)
command: 'pmvarrun' '-u' 'leonidas' '-o' '-1'
pam_mount(misc.c:38): set_myuid<pre>: (ruid/rgid=0/513, e=0/513)
pam_mount(misc.c:38): set_myuid<post>: (ruid/rgid=0/513, e=0/513)
pmvarrun(pmvarrun.c:252): parsed count value 1
pam_mount(pam_mount.c:440): pmvarrun says login count is 0
pam_mount(mount.c:749): going to unmount
pam_mount(mount.c:647): Could not get realpath of /home/leonidas: No such file or directory pam_mount(mount.c:218): Mount info: globalconf, user=leonidas <volume fstype="cifs" server="amahoro" path="users/leonidas" mountpoint="/home/leonidas" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="" /> fstab=0 ssh=0
command: 'umount' '/home/leonidas'
pam_mount(misc.c:38): set_myuid<pre>: (ruid/rgid=0/513, e=0/513)
pam_mount(misc.c:38): set_myuid<post>: (ruid/rgid=0/513, e=0/513)
pam_mount(mount.c:69): umount messages:
pam_mount(mount.c:73): umount: /home/leonidas: not found
pam_mount(mount.c:752): unmount of users/leonidas failed
pam_mount(pam_mount.c:728): pam_mount execution complete
pam_mount(pam_mount.c:115): Clean global config (0)
pam_mount(pam_mount.c:132): clean system authtok=0x88e2558 (0)


pam_mount.conf.xml:


<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<!--
        See pam_mount.conf(5) for a description.
-->

<pam_mount>

                <!-- debug should come before everything else,
                since this file is still processed in a single pass
                from top-to-bottom -->

<debug enable="2" />

                <!-- Volume definitions -->
<volume fstype="cifs" server="amahoro" path="users/%(USER)" noroot="1" mountpoint="/home/%(USER)" />

                <!-- pam_mount parameters: General tunables -->
<luserconf name=".pam_mount.conf.xml" />



<!-- Note that commenting out mntoptions will give you the defaults.
     You will need to explicitly initialize it with the empty string
     to reset the defaults to nothing. -->
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<!--
<mntoptions deny="suid,dev" />
<mntoptions allow="*" />
<mntoptions deny="*" />
-->
<mntoptions require="nosuid,nodev" />

<logout wait="0" hup="0" term="0" kill="0" />


                <!-- pam_mount parameters: Volume-related -->

<mkmountpoint enable="1" remove="true" />
<smbmount> mount.cifs //amahoro/users/%(USER) /home/%(USER) -o user=%(USER)</smbmount>
<umount> umount /home/%(USER) </umount>


</pam_mount>


Fatemi sapere se vedete qualcosa che non va.

Grazie


Reply to: