Forums.ATC.no

Teknisk => Generelt teknisk => Emne startet av: ATC på 23. April 2009, 07:52 am

Tittel: Samba: Home directory shares not working after joining a domain
Skrevet av: ATC23. April 2009, 07:52 am
Successfully configured Samba to join a windows domain. Other shares work OK but home directory shares do not.
Tittel: [Solved] Samba: Home directory shares not working after joining a domain
Skrevet av: ATC23. April 2009, 07:52 am
This can probably be caused by several things, but here's what I found:

1. User/group ID mapping. If you are using winbind to map uid/gid to global values (shared between all Samba hosts) then the current file ownerships are no longer valid. In a mixed unix/linux environment this can be a real problem so we recommend switching this feature OFF. Simply comment out  "winbind uid", "winbind gid" and "idmap" statements from "smb.conf" and restart Samba to accomplish this.

2. Home directories. When not in a domain, Samba looks to "/etc/passwd" (or whatever backend you have configured) to determine the home directory for each user. When in a domain however, it uses a directive called "template homedir". If this is not set in "smb.conf", the default setting is "/home/%D/%U". Unless you want to rearrange your home directories (again, difficult in a mixed environment) you will probably want to set this to "/home/%U" or whatever matches your existing setup.

If the above does not work for you, consider using "username map" like so:
"username map = /etc/samba/usermap"
In /etc/samba/usermap" put "unixname = DOMAIN\windowsname" replacing the dummy names with the actual users.

You might want to automate this, see "username map script".