ubuntuusers.de

Problem LDAP Client Anmeldung unter Gnome (GDM, pam-mount)

Status: Ungelöst | Ubuntu-Version: Ubuntu 9.04 (Jaunty Jackalope)
Antworten |

sgeberl

Anmeldungsdatum:
13. Mai 2005

Beiträge: 3

Wohnort: Balzers

Hallo, ich bin beim Versuch, auf ldap-Anmeldung umzusteigen auf ein äusserst seltsames Verhalten gestossen. Die Anmeldung klappt beim ersten mal perfekt (leeres Home), eine weitere Anmeldung ist dann aber nicht mehr möglich (schwarzer Bildschirm mit weissem Mauszeiger - Umstieg auf Konsole und Anmeldung dort ist immer noch problemlos möglich). Die Anmeldung klappt dann wieder, wenn ich alle desktoprelevanten (.xxx) Dateien am Home-Verzeichnis (auf dem Server) lösche. Konfiguration: Standard LDAP-Client (pam-ldap) wie von Ubuntu vorgeschlagen. Mounten des Home-Verzeichnisses (Samba-Share) mittels pam-mount. Die Anmeldung an der Konsole klappt immer (auch mit Home-Verzeichnis). Wenn das Home-Verzeichnis normal (lokal) am Client geführt wird, funktioniert die Anmeldung.

Leider kann ich den Fehler / das Verhalten nicht lokalisieren oder zuordnen und damit auch kein Log schicken (welches? - ich finde nirgendwo einen aussagekräftigen Eintrag).

Bitte um Hinweise, was da falsch gelaufen sein könnte (eventuell wo aussagekräftige Logs stehen oder welchen Loglevel ich einstellen könnte).

Danke und Grüsse, Stephan

roemer2201

Avatar von roemer2201

Anmeldungsdatum:
2. November 2007

Beiträge: 241

Wohnort: Chemnitz

Ich habe jetzt gerade das gleiche Problem, hast du eine Lösung für das Problem gefunden? Oder hat jemand anderes einen Vorschlag?

roemer2201

Avatar von roemer2201

Anmeldungsdatum:
2. November 2007

Beiträge: 241

Wohnort: Chemnitz

Fortschritt: Wenn man im GDM-Anmeldefenster die abgesicherte Anmeldung auswählt funktioniert die Anmeldung mit einbinden des Homeverzeichnisses vom Server. Jedoch frage ich mich, welches Startscript dann bei einer normalen Anmeldung den Fehler verursacht. In welchem logfile kann ich da suchen?

Beim Abmelden wird das gemountete Verzeichnis nicht getrennt, weil zwei Prozesse das Verzeichnis immernoch verwenden: (siehe sudo lsof /home/user/)

1
2
3
COMMAND    PID   USER   FD   TYPE DEVICE SIZE NODE NAME
canberra- 4038 oliver  cwd    DIR   0,23    0    2 oliver/
pulseaudi 4060 oliver  cwd    DIR   0,23    0    2 oliver/

Hat jemand eine Lösung für das Problem?

sgeberl

(Themenstarter)

Anmeldungsdatum:
13. Mai 2005

Beiträge: 3

Wohnort: Balzers

Hallo, bei mir war es die Option "unix extensions" in der smb.conf Datei. Nachdem ich die ausgeschaltet hatte, hat es funktioniert. Anscheinend wurde der Share trotz Anweisung nicht als smb gemountet - dies ist allerdings nur eine Vermutung.

roemer2201

Avatar von roemer2201

Anmeldungsdatum:
2. November 2007

Beiträge: 241

Wohnort: Chemnitz

unix extensions = no

hat leider keinen Effekt... hast du Veränderungen in der /etc/pam.d/gdm vorgenommen? Kannst du diese Datei vielleicht mal posten und dazu noch die /etc/security/pam_mount.conf.xml? (beide von einem Client)

Ich probiere jetzt schon fast 10 Stunden am Stück, hab die weise Flagge schon bereitgelegt 😉

sgeberl

(Themenstarter)

Anmeldungsdatum:
13. Mai 2005

Beiträge: 3

Wohnort: Balzers

gdm ist unverändert

#%PAM-1.0
auth    requisite       pam_nologin.so
auth    required        pam_env.so readenv=1
auth    required        pam_env.so readenv=1 envfile=/etc/default/locale
@include common-auth
auth    optional        pam_gnome_keyring.so
@include common-account
session required        pam_limits.so
@include common-session
session optional        pam_gnome_keyring.so auto_start
@include common-password

ist alles in auth, account, session und password

#
# /etc/pam.d/common-auth - authentication settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authentication modules that define
# the central authentication scheme for use on the system
# (e.g., /etc/shadow, LDAP, Kerberos, etc.).  The default is to use the
# traditional Unix authentication mechanisms.
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules.  See
# pam-auth-update(8) for details.

auth	optional	                pam_group.so use_first_pass

# here are the per-package modules (the "Primary" block)
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
auth	optional			pam_mount.so use_first_pass
# 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)

# end of pam-auth-update config

#
# /etc/pam.d/common-account - authorization settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authorization modules that define
# the central access policy for use on the system.  The default is to
# only deny service to users whose accounts are expired in /etc/shadow.
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules.  See
# pam-auth-update(8) for details.
#

# here are the per-package modules (the "Primary" block)
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

#
# /etc/pam.d/common-session - session-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define tasks to be performed
# at the start and end of sessions of *any* kind (both interactive and
# non-interactive).
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules.  See
# pam-auth-update(8) for details.

# here are the per-package modules (the "Primary" block)
session	[default=1]			pam_permit.so
# here's the fallback if no module succeeds
session	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
session	required			pam_permit.so
# and here are more per-package modules (the "Additional" block)
session	required			pam_unix.so 
session	optional			pam_mount.so 		use_first_pass
session required      			pam_mkhomedir.so skel=/etc/skel umask=0022
session	optional			pam_ldap.so 
session	optional			pam_ck_connector.so nox11

# end of pam-auth-update config

#
# /etc/pam.d/common-password - password-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define the services to be
# used to change user passwords.  The default is pam_unix.

# Explanation of pam_unix options:
#
# The "sha512" option enables salted SHA512 passwords.  Without this option,
# the default is Unix crypt.  Prior releases used the option "md5".
#
# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
# login.defs.
#
# See the pam_unix manpage for other options.

# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules.  See
# pam-auth-update(8) for details.

# here are the per-package modules (the "Primary" block)
password	[success=2 default=ignore]	pam_unix.so obscure 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)
# end of pam-auth-update config

eventuell liegt's an common-pammount, die müsste aber auch schon per Default so gesetzt sein

# Include this file in every /etc/pam.d/SERVICE you use for login:
# [...]
# @include common-auth
# @include common-session
# [...]
# # added for libpam-mount
# @include common-pammount
#
# Make sure that the common-auth and common-session includes are
# above the common-pammount include (just as in the example above).

# replace "optional" with "required" if a user must mount the specified
# volumes, for example the home directory

# make sure that there is no PAM module loaded with a "sufficient"
# priority before these entries, else the pam_mount module is not
# executed

# for configuration details about different login programs see
# /usr/share/doc/libpam-mount/README.Debian.gz

auth       optional   pam_mount.so
session    optional   pam_mount.so

Der Befehl in pam_mount.conf.xml müsste dann so aussehen

<pam_mount>
	<volume  fstype="smbfs"  server="192.168.10.21"  path="%(USER)" mountpoint="/home/%(USER)" />

Bitte Vorsicht, ich bin wegen gemischter Umgebung nach kurzer Zeit dazu übergegangen, auf /media/%(USER) zu mounten und die relevanten Inhalte mit einem lokalen Home zu synchronisieren (habe also keine Erfahrung, ob das auf Dauer = > 1 Monat funktioniert). Ich hoffe, das hilft etwas weiter.

roemer2201

Avatar von roemer2201

Anmeldungsdatum:
2. November 2007

Beiträge: 241

Wohnort: Chemnitz

okay, vielen Dank ☺ ich werde morgen den Ubuntuclient mal neu installieren, dabei dann nochmal alles sauber einplegen und mit deinem vergleichen. Ich habe jetzt soviel daran rumprobiert, dass ich nicht mehr weis, was ich alles gemacht habe.

Vielen Dank schonmal ☺

Der Befehlt in der pam_mount.conf.xml sieht bei mir derzeit so aus:

<volume user="*" fstype="smbfs" server="192.168.2.107" path="linux-home" mountpoint="/home/%(USER)" options="iocharset=utf8,uid=%(USER),gid=%(USERGID),dmask=0700" />

Die ganzen Options hast du ja gar nicht mit drin ... aber wie gesagt, ich werde morgen probieren.

steelsteel

Anmeldungsdatum:
17. Oktober 2008

Beiträge: 154

Die ganzen Options hast du ja gar nicht mit drin ... aber wie gesagt, ich werde morgen probieren.

Mein Problem 2010:

Die OpenLDAP Authentifizierung läuft am Client. (gentenv paswd liefert alle User) Ein <volume ...> habe ich in der /etc/security/pam_mount.conf.xml eingetragen:

<volume user="%(USER)" fstype="smbfs" server="serverip" path="smbfreigabe/%(USER)"
 mountpoint="/pfadspeziell/%(USER)" 

Im LDAP wurde das Userverzeichnis speziell auf /pfadspeziell/$User festgelegt.

Nun wird beim Userlogin im Mountpunkt client:/pfadspeziell/$User ein leerer Ordner angelegt, der aber leider nicht vom smb-Server kommt.

Die Meldungen beim Wechsel zu einem LDAP-User in der Konsole (su nutzer) lauten dabei:

pam_mount(pam_mount.c:314): pam_mount 1.32: entering auth stage
pam_mount(pam_mount.c:524): pam_mount 1.32: entering session stage
pam_mount(misc.c:38): Session open: (uid=1000, euid=0, gid=20, egid=20)
pam_mount(pam_mount.c:583): no volumes to mount
command: [pmvarrun] [-u] [ricopetermann] [-o] [1] 
pam_mount(misc.c:38): set_myuid<pre>: (uid=1000, euid=0, gid=20, egid=20)
pam_mount(misc.c:38): set_myuid<post>: (uid=0, euid=0, gid=20, egid=20)
pmvarrun(pmvarrun.c:248): parsed count value 5
pam_mount(pam_mount.c:424): pmvarrun says login count is 6
pam_mount(pam_mount.c:614): done opening session (ret=0)

Wollte dieses HowTo nehmen, ist aber veraltet. (http://forum.ubuntuusers.de/topic/pam-mount-mit-gdm-gnome-problem-beim-einlogge/#post-704384) Auch hatte ich das Gefuehl, dass einem pam-auth-update einen Großteil der frueher notwendigen Konfigurationsarbeit abnimmt. Jedoch sind die neuen /etc/pam.d/-Dateien durch include common-* drmaßen unübersichtlich und für mein Verständnis schlecht dokumentiert, so dass ich hier schlicht und ergreifend nicht weiterkomme.

Dieser Bug half nicht weiter: http://forum.ubuntuusers.de/post/2692319/quote/ Hier hat jmd scheinbar das selbe Problem: http://ubuntuforums.org/showthread.php?t=1621544

Unangenehm, bitte um Hilfe!

Antworten |