pam_mount configuration for users home directories from server to client
zingalo
lozingalo at gmail.com
Wed May 16 13:54:41 UTC 2012
Hi,
i can't mount the user's home directories from the ldap-samba server
(amahoro) on the clients at login time.
I installed pam_mount but the configuration is not correct i think or
something about directory permissions. I want that the user home
directory in /users/username on the server will be mount on the client
on /home/username.
Mounting manually with:
mount.cifs //amahoro/users/username /home/username -o user=username
it runs.
Could you take a look to the command-output and to pam_mount.conf.xml
please?
login: zingalo
Password:
pam_mount(pam_mount.c:364): pam_mount 2.10: entering auth stage
Last login: Wed May 16 12:18:36 CAT 2012 on pts/0
Welcome to Ubuntu 11.10 (GNU/Linux 3.0.0-12-generic i686)
* Documentation: https://help.ubuntu.com/
394 packages can be updated.
108 updates are security updates.
New release '12.04 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
*** /dev/sda5 will be checked for errors at next reboot ***
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
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/zingalo: No such
file or directory
pam_mount(mount.c:218): Mount info: globalconf, user=zingalo <volume
fstype="cifs" server="amahoro" path="users/zingalo"
mountpoint="/home/zingalo" 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/zingalo
pam_mount(mount.c:299): mkdir[0] /home/zingalo
pam_mount(mount.c:307): chown /home/zingalo -> 2001:513
command: 'mount' '-t' 'cifs' '//amahoro/users/zingalo' '/home/zingalo'
'-o' 'user=zingalo,uid=2001,gid=513'
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)
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(misc.c:380): 29 20 0:22 /zingalo /home/zingalo rw,relatime -
cifs //amahoro/users/zingalo
rw,sec=ntlm,unc=\\amahoro\users,username=zingalo,uid=2001,forceuid,gid=513,forcegid,addr=192.168.5.219,unix,posixpaths,serverino,acl,rsize=16384,wsize=131008,actimeo=1
command: 'pmvarrun' '-u' 'zingalo' '-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=/
zingalo at dello:/$
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="0"
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>
Thanks
More information about the ubuntu-users
mailing list