Hallo Zusammen,
da man mir hier ja schon sehr viel geholfen hat und ich mein pam_mount-Problem bis her trotz aller Beispiele nicht gelöst bekommen habe, dachte ich ich frag euch mal ☺
Also ich habe ein Synology NAS mit einem LDAP Dienst, einen aktuellen Ubuntu Rechner Version Ubuntu 14.04 LTS. Ich habe erfolgreich den Rechner an das LDAP gebunden und kann jetzt meine User über das LDAP authentifizieren. Alles super soweit ☺
Nun möchte ich aber, dass Userspezifische shares über cifs und pam_mount eingebunden werden können. Bekomme das auch hin, solange diese Shares keine authentifizierung benötigen. Sobald das der fall ist, sieht man im log, dass er sich mit dem share nicht authentifizieren kann. Jetzt ist die Frage was habe ich vergessen oder übersehen?
Installiert habe ich: sudo apt-get install libnss-ldap libpam-ldap libpam-mount winbind smbclient cifs-utils ldap-utils nslcd
Hier meine konfiguration: /etc/ldap.conf
1 2 3 4 5 6 7 | base dc=intranet,dc=FIRMA,dc=de uri ldap://192.168.178.2:389 ldap_version 3 rootbinddn uid=root,cn=users,dc=intranet,dc=FIRMA,dc=de bind_policy soft pam_password md5 nss_initgroups_ignoreusers +,avahi,avahi-autoipd,backup,bin,colord,daemon,dnsmasq,games,gnats,guest-lKG3vm,hplip,irc,kernoops,libuuid,lightdm,list,lp,mail,man,messagebus,news,proxy,pulse,root,rtkit,saned,speech-dispatcher,sshd,stunnel4,sync,sys,syslog,usbmux,uucp,whoopsie,www-data,xrdp |
/etc/passwd ...
- +::::
/etc/group
...
- +:
/etc/nsswitch.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | passwd: ldap compat group: ldap compat shadow: ldap compat hosts: files mdns4_minimal [NOTFOUND=return] dns networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis #hinzugefügt #passwd_compat: ldap #group_compat: ldap #shadow_compat: ldap |
/etc/pam.d/common-auth
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | auth [success=2 default=ignore] pam_unix.so nullok_secure auth [success=1 default=ignore] pam_ldap.so use_first_pass # here's the fallback if no module succeeds auth requisite pam_deny.so # prime the stack with a positive return value if there isn't one already; # this avoids us returning an error just because nothing sets a success code # since the modules above will each just jump around auth required pam_permit.so # and here are more per-package modules (the "Additional" block) auth optional pam_ecryptfs.so unwrap auth optional pam_cap.so # end of pam-auth-update config #hinzugefügt auth sufficient pam_ldap.so auth required pam_unix.so use_first_pass nullok_secure |
/etc/pam.d/common-account
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | account [success=2 new_authtok_reqd=done default=ignore] pam_unix.so account [success=1 default=ignore] pam_ldap.so # here's the fallback if no module succeeds account requisite pam_deny.so # prime the stack with a positive return value if there isn't one already; # this avoids us returning an error just because nothing sets a success code # since the modules above will each just jump around account required pam_permit.so # and here are more per-package modules (the "Additional" block) # end of pam-auth-update config #hinzugefügt account sufficient pam_ldap.so account required pam_unix.so use_first_pass |
/etc/pam.d/common-password
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | password requisite pam_cracklib.so retry=3 minlen=8 difok=3 password [success=2 default=ignore] pam_unix.so obscure use_authtok try_first_pass sha512 password [success=1 user_unknown=ignore default=die] pam_ldap.so use_authtok try_first_pass # here's the fallback if no module succeeds password requisite pam_deny.so # prime the stack with a positive return value if there isn't one already; # this avoids us returning an error just because nothing sets a success code # since the modules above will each just jump around password required pam_permit.so # and here are more per-package modules (the "Additional" block) password optional pam_gnome_keyring.so password optional pam_ecryptfs.so # end of pam-auth-update config #hinzugefügt password sufficient pam_ldap.so password required pam_cracklib.so retry=3 minlen=6 difok=3 password required pam_unix.so use_first_pass nullok obscure min=4 max=8 md5 |
/etc/pam.d/common-session
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | session [default=1] pam_permit.so session requisite pam_deny.so session required pam_permit.so session optional pam_umask.so # and here are more per-package modules (the "Additional" block) session required pam_unix.so session optional pam_ldap.so session optional pam_systemd.so session optional pam_ecryptfs.so unwrap session optional pam_ck_connector.so nox11 # end of pam-auth-update config #hinzugefügt session optional pam_foreground.so session required pam_mkhomedir.so skel=/etc/skel umask=0022 |
/etc/security/pam_mount.conf.xml
1 2 3 | ... <volume user="*" fstype="cifs" server="SEVER_IP" path="PATH" mountpoint="/media/mountpoint" options="sec=ntlm,nodev,nosuid" /> ... |
Also wenn mir da einer Helfen könnte ☺
Grüße, Sven
PS: Ich hoffe ich habe alles nötigen Infos geschickt!