Цель состоит в том, чтобы иметь собственный домашний каталог, поскольку нам нужно перейти с /домой, в новый том, /люди.
Я создал нового тестового пользователя, bilbo, но служба winbind считает, что их дом находится в / главная / бильбо вместо / люди / бильбо.
Я подозреваю, что Samba даже не считывает путь к домашнему каталогу пользователя из Active Directory, о чем свидетельствуют результаты. Есть ли для этого флаг smb.conf?
Шаги, предпринятые для добавления нового пользователя с настраиваемым путем к домашнему каталогу:
Create new user in AD,
with extensions, used home directory path of "/people/bilbo"
On CentOS 7 host,
I manually created /people/bilbo and contents,
and tagged all files/directories with proper permissions.
Однако при первоначальном входе в систему система создала новый «/ home / bilbo» вместо использования существующего пути!
Что еще пробовал:
Restart smb and winbind, and flushed cache (deleting *.tdb's too) - no good.
Modified the local smb.conf, removing "template homedir = /home/%U" and restarted smb and winbind.
- it then created a new one in /home/DEVELOPMENT/bilbo upon login, and did not attempt to look in /people at all.
Содержимое smb.conf:
[global]
security = ADS
workgroup = DEVELOPMENT
realm = DEVELOPMENT.mycompany.com
client use spnego = yes
server signing = auto
server string = Samba Client
winbind nss info = rfc2307
winbind enum users = yes
winbind enum groups = yes
winbind use default domain = yes
winbind separator = +
winbind refresh tickets = yes
winbind offline logon = yes
inherit acls = yes
idmap config * : backend = tdb
idmap config * : range = 10000-20000
template homedir = /home/%U
force group = dev
template shell = /bin/bash
Есть предложения, рекомендации?
Я нашел причину:
При использовании более новой версии samba я использовал настройки до 4.6.0.
Я переработал smb.conf, чтобы учесть некоторые локальные идентификаторы и большее пространство AD, а также исправил мой сбор данных RFC2307 из Windows Active Directory.
##### New smb.conf file #####
password server = windowsADserver.development.mycompany.com
passdb backend = tdbsam
# idmap config for local BUILTIN accounts and groups
idmap config * : backend = tdb
idmap config * : range = 3000-7999
# idmap config for the DEVELOPMENT domain
idmap config DEVELOPMENT:backend = ad <<---- Need AD backend
idmap config DEVELOPMENT:schema_mode = rfc2307 <<---- plus this one
idmap config DEVELOPMENT:unix_nss_info = yes <<---- and this one
idmap config DEVELOPMENT:range = 10000-40000
idmap config DEVELOPMENT:unix_primary_group = yes
template shell = /bin/bash
template homedir = /home/%U
winbind use default domain = true
winbind offline logon = false
winbind enum users = yes
winbind enum groups = yes
encrypt passwords = yes
log file = /var/log/samba/log.%m
max log size = 50
kerberos method = system keytab
log level = 10
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes