1

I have a xubuntu 14.04 client, a debian 8 Samba File server and an external Active Directory service. I log in as user1 on the client authenticating against the ADS with winbind. My home directory /home/ADS/user1 is mounted on login from the Samba server. df output is:

//server/homes/ 11718445056 6596289592 5122155464  57% /home/ADS

The shared samba folder contains several other home directories (output ls -l on server) ('domänen-benutzer' is german and means 'domain-user'):

drwx------ 14 user1   domänen-benutzer 4096 Apr 29 15:51 user1
drwx------ 14 user2   domänen-benutzer 4096 Apr 29 16:50 user2
drwxr-xr-x 13 root    root             4096 Apr 19 16:02 otherstuff

But when i list the mounted folder on my client it shows:

drwx------ 14 user1   domänen-benutzer 4096 Apr 29 15:51 user1
drwx------ 14 user1   domänen-benutzer 4096 Apr 29 16:50 user2
drwxr-xr-x 13 user1   domänen-benutzer 4096 Apr 19 16:02 otherstuff

That's bad. And ls -l /home shows:

drwxr-xr-x 14 user1   domänen-benutzer 4096 Apr 29 15:51 ADS

Why do the file permissions change when they are mounted on the client? And how can I stop it?

Further information:

I mount the shared Folder with PAM mount. Therefor I installed the packages libpam-mount, cifs-utils on my client and added following line in /etc/security/pam_mount.conf.xml:

<volume fstype="cifs" path="//chronos/homes/" mountpoint="/home/ADS/"/>

My smb.conf file looks like this:

[global]
 workgroup = ADS

 security = ads
 realm = ADS.EXAMPLE.COM
 password server = *
 client use spnego = yes
 client ntlmv2 auth = yes
 restrict anonymous = 2

 encrypt passwords = yes

 domain master = no
 local master = no
 preferred master = no
 os level = 0

 idmap uid = 10000-40000000
 idmap gid = 10000-40000000
 template shell = /bin/bash
 template homedir = /home/ADS/%U

 winbind enum users = no
 winbind enum groups = no
 winbind cache time = 300
 winbind use default domain = yes

[homes]
 #create home directories at login
 root preexec = bash -c '[[ -d /home/ADS/%U ]] || mkdir -m 0700 /home/ADS/%U && chown %U:%G /home/ADS/%U'
 read only = no
 path = /home/ADS/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.