Anbindung an Windows Server 2003
zypper in pam_mount
vi /etc/security/pam_mount.conf.xml
debug 0
volume * cifs 192.168.1.1 & /home/&/server uid=&,iocharset=utf8,fmask=0755,dmask=0755 - -
mkdir /etc/skel/server (bzw. müssen wir im Profil berücksichtigen)
vi /etc/pam.d/login
auth optional pam_mount.so use_first_pass
session optional pam_mount.so use_first_pass
vi /etc/pam.d/common-auth-pc
auth optional pam_mount.so use_first_pass
vi /etc/pam.d/common-session-pc
session optional pam_mount.so
Anbindung an s4e
zypper in pam_mount
vi /etc/security/pam_mount.conf.xml
debug 0
volume * cifs 192.168.1.1 & /home/&/server uid=&,iocharset=utf8,fmask=0755,dmask=0755 - -
mkdir /etc/skel/server (bzw. müssen wir im Profil berücksichtigen)
vi /etc/pam.d/login
auth optional pam_mount.so use_first_pass
session optional pam_mount.so use_first_pass
vi /etc/pam.d/common-auth-pc
auth optional pam_mount.so use_first_pass
vi /etc/pam.d/common-session-pc
session optional pam_mount.so
gdm
if test "$USER" != "root" && test "$USER" != "profil"; then
DIRS=`ls -A --ignore=server /home/$USER`
CURRENT=`pwd`
cd /home/$USER
rm -rf $DIRS
cd $CURRENT
rsync -a /etc/skel/ /home/$USER/
chown -R $USER /home/$USER
fi
pam_mount
<?xml version="1.0" encoding="utf-8" ?>
<pam_mount>
<debug enable="0" />
<mkmountpoint enable="1" remove="true" />
<fsckloop device="/dev/loop7" />
<luserconf name=".pam_mount.conf.xml" />
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<mntoptions require="nosuid,nodev" />
<path>/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin</path>
<lsof>lsof %(MNTPT)</lsof>
<fsck>fsck -p %(FSCKTARGET)</fsck>
<losetup>losetup -p0 "%(before=\"-e\" CIPHER)"
"%(ifnempty=\"-k\" KEYBITS)" %(KEYBITS) %(FSCKLOOP) %(VOLUME)</losetup>
<unlosetup>losetup -d %(FSCKLOOP)</unlosetup>
<cifsmount>mount -t cifs //%(SERVER)/%(VOLUME) %(MNTPT) -o
"user=%(USER),uid=%(USERUID),gid=%(USERGID)%(before=\",\" OPTIONS)"</cifsmount>
<davmount>mount -t davfs %(SERVER)/%(VOLUME) %(MNTPT) -o
"username=%(USER),uid=%(USERUID),gid=%(USERGID)%(before=\",\"
OPTIONS)"</davmount>
<smbmount>smbmount //%(SERVER)/%(VOLUME) %(MNTPT) -o
"username=%(USER),uid=%(USERUID),gid=%(USERGID)%(before=\",\" OPTIONS)"</smbmount>
<smbumount>smbumount %(MNTPT)</smbumount>
<ncpmount>ncpmount %(SERVER)/%(USER) %(MNTPT) -o
"pass-fd=0,volume=%(VOLUME)%(before=\",\" OPTIONS)"</ncpmount>
<ncpumount>ncpumount %(MNTPT)</ncpumount>
<fusemount>mount.fuse %(VOLUME) %(MNTPT)
"%(ifnempty=\"-o\" OPTIONS)" %(OPTIONS)</fusemount>
<fuseumount>fusermount -u %(MNTPT)</fuseumount>
<truecryptmount>truecrypt %(VOLUME) %(MNTPT)</truecryptmount>
<truecryptumount>truecrypt -d %(MNTPT)</truecryptumount>
<fd0ssh>pmt-fd0ssh</fd0ssh>
<umount>umount %(MNTPT)</umount>
<lclmount>mount -p0 -t %(FSTYPE) %(VOLUME) %(MNTPT)
"%(ifnempty=\"-o\" OPTIONS)" %(OPTIONS)</lclmount>
<cryptmount>mount -t crypt "%(ifnempty=\"-o\" OPTIONS)" %(OPTIONS)
%(VOLUME) %(MNTPT)</cryptmount>
<nfsmount>mount %(SERVER):%(VOLUME) %(MNTPT)
"%(ifnempty=\"-o\" OPTIONS)" %(OPTIONS)</nfsmount>
<mntcheck>mount</mntcheck>
<pmvarrun>pmvarrun -u %(USER) -o %(OPERATION)</pmvarrun>
<volume fstype="cifs" server="s4e" path="homes"
mountpoint="/home/%(USER)/server" options="dir_mode=0755" />
<msg-authpw>pam_mount password:</msg-authpw>
<msg-sessionpw>reenter password for pam_mount:</msg-sessionpw>
</pam_mount>
auth required pam_env.so
auth sufficient pam_unix2.so
auth required pam_ldap.so use_first_pass
auth optional pam_mount.so use_first_pass
session optional pam_mkhomedir.so silent
session required pam_limits.so
session required pam_unix2.so
session optional pam_ldap.so
session optional pam_umask.so
session optional pam_mount.so