andreasde95
Goto Top

Hilfe bei Laufwerk mounten mit pam mount conf xml

Hallo,

wie oben schon beschrieben habe ich ein Problem mit der pam_mount.conf.xml.

habe einen Windows Server 2012 R2 mit Benutzern und für jeden Benutzer Homelaufwerk was bei Windows automatisch gemountet wird.

Dies klappt aber bei Linux (Kubuntu 14.04) nicht.

Anmelden mit dem Windows User auf der Linux Maschine kann ich.

meine Konfig der pam_mount.conf.xml

<Volume
fstype = "cifs"
server = "Testserver.example.com"
path = "home\%(DOMAIN_USER)"
mountpoint = "/home/EXAMPLE/%(DOMAIN_USER)"
options = "sec=krb5, workgroup=EXAMPLE" />

Windows:
name des Servers: Testserver
Domäne: Example.com
Freigabe: home/"Username"


hoffe ihr könnt mir helfen dieses Laufwerk zu mounten damit es nach dem anmelden sichtbar ist.


Mit freundlichen Grüßen
Andreas

Content-Key: 257225

Url: https://administrator.de/contentid/257225

Ausgedruckt am: 28.03.2024 um 21:03 Uhr

Mitglied: bytecounter
bytecounter 10.12.2014 um 22:32:02 Uhr
Goto Top
Hallo,

Zum Glück hat MS nur eine Version von Windows Server herausgebracht und in den letzten 30 Jahren daran auch - insbesondere an den Authentifizierungsmethoden - nichts geändert.

Und echte Admins leiten alle (Log-)ausgaben auf >/dev/null.. Logdateien sind nur was für Warmduscher.

Also, welche Version des MS Server?
Was steht in den Fehlerlogs (Windows / Linux)?


vg
Bytecounter
Mitglied: Andreasde95
Andreasde95 11.12.2014 um 08:09:11 Uhr
Goto Top
Also, welche Version des MS Server?
Windows Server 2012R2
Was steht in den Fehlerlogs (Windows / Linux)?

Linux Log:

Dec 11 07:54:35 Kubuntu lightdm: (pam_mount.c:629): no volumes to mount
Dec 11 07:54:35 Kubuntu lightdm: command: 'pmvarrun' '-u' 'linux' '-o' '1'
Dec 11 07:54:35 Kubuntu lightdm: (pam_mount.c:441): pmvarrun says login count is 1
Dec 11 07:54:35 Kubuntu lightdm: (pam_mount.c:660): done opening session (ret=0)
Dec 11 07:54:35 Kubuntu systemd-logind[446]: Removed session c3.
Dec 11 07:54:35 Kubuntu systemd-logind[446]: New session c4 of user linux.
Dec 11 07:54:35 Kubuntu systemd-logind[446]: Linked /tmp/.X11-unix/X0 to /run/user/1001111/X11-display.
Dec 11 07:54:35 Kubuntu lightdm: pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
Dec 11 07:54:35 Kubuntu lightdm: pam_kwallet(lightdm:session): pam_sm_open_session
Dec 11 07:54:35 Kubuntu lightdm: pam_kwallet(lightdm:session): pam-kwallet: final socket path: /tmp//linux.socket
Mitglied: bytecounter
bytecounter 11.12.2014 um 15:29:52 Uhr
Goto Top
Da steht's doch schon gleich in der ersten Zeile:

no volumes to mount

Dass Dein Laufwerk nicht "da" ist, ist eine Folge dass Ubuntu nichts findet, was er mounten soll/kann,

Ist die XML im richtigen Verzeichnis? Sind die Rechte entsprechend gesetzt?

Setz mal in der pam_mount.conf
 <debug enable="1" />  

Dann gucken, was alles im Log steht.

vg
Bytecounter
Mitglied: Andreasde95
Andreasde95 12.12.2014 aktualisiert um 11:19:26 Uhr
Goto Top
Ist die XML im richtigen Verzeichnis? Sind die Rechte entsprechend gesetzt?

die XML ist im Ordner /etc/security/

zur Testzwecken habe ich die datei mit den rechten 777 vergeben.


Setz mal in der pam_mount.conf
>  <debug enable="1" ></debug>  
> 

debug enable="1" ist war schon an

log:

nopasswdlogin" not met by user "linux"
Dec 12 11:12:53 Kubuntu lightdm: pam_unix(lightdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost= user=linux
Dec 12 11:12:53 Kubuntu lightdm: pam_winbind(lightdm:auth): getting password (0x00000388)
Dec 12 11:12:53 Kubuntu lightdm: pam_winbind(lightdm:auth): pam_get_item returned a password
Dec 12 11:12:53 Kubuntu lightdm: pam_winbind(lightdm:auth): user 'linux' granted access
Dec 12 11:12:53 Kubuntu lightdm: (pam_mount.c:365): pam_mount 2.14: entering auth stage
Dec 12 11:12:53 Kubuntu lightdm: pam_kwallet(lightdm:auth): pam_sm_authenticate
Dec 12 11:12:56 Kubuntu lightdm: pam_unix(lightdm-greeter:session): session closed for user lightdm
Dec 12 11:12:56 Kubuntu lightdm: (pam_mount.c:706): received order to close things
Dec 12 11:12:56 Kubuntu lightdm: (pam_mount.c:709): No volumes to umount
Dec 12 11:12:56 Kubuntu lightdm: command: 'pmvarrun' '-u' 'lightdm' '-o' '-1'
Dec 12 11:12:56 Kubuntu lightdm: (pam_mount.c:441): pmvarrun says login count is 0
Dec 12 11:12:56 Kubuntu lightdm: (pam_mount.c:743): pam_mount execution complete
Dec 12 11:12:56 Kubuntu lightdm: pam_kwallet(lightdm-greeter:session): pam_sm_close_session
Dec 12 11:12:56 Kubuntu lightdm: pam_kwallet(lightdm-greeter:setcred): pam_sm_setsecred
Dec 12 11:12:56 Kubuntu lightdm: (pam_mount.c:116): Clean global config (0)
Dec 12 11:12:56 Kubuntu lightdm: pam_kwallet(lightdm:setcred): pam_sm_setsecred
Dec 12 11:12:56 Kubuntu lightdm: pam_unix(lightdm:session): session opened for user linux by (uid=0)
Dec 12 11:12:56 Kubuntu lightdm: (pam_mount.c:568): pam_mount 2.14: entering session stage
Dec 12 11:12:56 Kubuntu lightdm: (pam_mount.c:629): no volumes to mount
Dec 12 11:12:56 Kubuntu lightdm: command: 'pmvarrun' '-u' 'linux' '-o' '1'
Dec 12 11:12:56 Kubuntu lightdm: (pam_mount.c:441): pmvarrun says login count is 1
Dec 12 11:12:56 Kubuntu lightdm: (pam_mount.c:660): done opening session (ret=0)
Dec 12 11:12:56 Kubuntu systemd-logind[601]: Removed session c1.
Dec 12 11:12:56 Kubuntu systemd-logind[601]: New session c2 of user linux.
Dec 12 11:12:56 Kubuntu systemd-logind[601]: Linked /tmp/.X11-unix/X0 to /run/user/1001111/X11-display.
Mitglied: bytecounter
bytecounter 13.12.2014 um 11:25:24 Uhr
Goto Top
Poste mal bitte deine kompletten Configs. (pam_mount.conf und die XML)

vg
Bytecounter
Mitglied: Andreasde95
Andreasde95 15.12.2014 aktualisiert um 14:56:18 Uhr
Goto Top

Poste mal bitte deine kompletten Configs. (pam_mount.conf und die XML)

es ist eine datei:
?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="1" /> 

                <!-- Volume definitions -->
<Volume
fstype = "cifs" 
server = "Testserver.example.com" 
path = "home\%(DOMAIN_USER)" 
mountpoint = "/home/EXAMPLE/%(DOMAIN_USER)" 
options = "sec=krb5, workgroup=EXAMPLE" /> 
      
                <!-- 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 -->
Mitglied: bytecounter
bytecounter 15.12.2014 um 10:10:09 Uhr
Goto Top
So an sich kann ich - außer der fehlenden öffnenden spitzen Klammer - keinen Fehler erkennen.
Beim posten beachte doch bitte Formatierungen in den Beiträgen. Das macht das Lesen für uns deutlich leichter.

Deinen mountpount habe ich noch nicht verstanden:
mountpoint = "/home/EXAMPLE/%(DOMAIN_USER)"

Warum nicht
mountpoint = "/home/%(USER)/server"  

vg Bytecounter
Mitglied: Andreasde95
Andreasde95 15.12.2014 aktualisiert um 14:57:10 Uhr
Goto Top

Deinen mountpount habe ich noch nicht verstanden:
> mountpoint = "/home/EXAMPLE/%(DOMAIN_USER)"

hier wird doch der Mountpoint auf dem Lokalen PC beschrieben.

die Struktur ist doch Home dann kommt das es sich um einen Domänen User handelt (Ordner EXAMPLE) und danach der USER.

Warum nicht
> mountpoint = "/home/%(USER)/server"  
> 

bei dir entspricht ja server auch nur einem Lokalen Ordner diesen hab ich weggelassen macht aber auch keinen unterschied oder ?

Mit freundlichen Grüßen
Andreas