Устанавливаем пакеты apt-get update apt-get install smbldap-tools samba samba-common Скопируем файлы конфигурации из дистрибутива cp /usr/share/doc/smbldap-tools/examples/smbldap_bind.conf /etc/smbldap-tools zcat /usr/share/doc/smbldap-tools/examples/smbldap.conf.gz > /etc/smbldap-tools/smbldap.conf Редактируем файл **smbldap_bind.conf** - в нем нам нужно записать данные для административного доступа к базе [[ubuntuserver810:slapd|OpenLDAP]] masterDN="cn=admin,dc=drivesource,dc=ru" masterPw="password" Получим идентификатор **SID((Secure ID))** для нашего PDC((Primary Domain Controller)) net getlocalsid Редактируем файл **smbldap.conf** # Put your own SID. To obtain this number do: "net getlocalsid". # If not defined, parameter is taking from "net getlocalsid" return SID="S-1-5-21-2252255531-4061614174-2474224977" # Domain name the Samba server is in charged. # If not defined, parameter is taking from smb.conf configuration file # Ex: sambaDomain="IDEALX-NT" sambaDomain="DRIVESOURCE" # LDAP Suffix # Ex: suffix=dc=IDEALX,dc=ORG suffix="dc=drivesource,dc=ru" ############################################################################## # # SAMBA Configuration # ############################################################################## # The UNC path to home drives location (%U username substitution) # Just set it to a null string if you want to use the smb.conf 'logon home' # directive and/or disable roaming profiles # Ex: userSmbHome="\\PDC-SMB3\%U" userSmbHome="\\DAEMON\%U" # The UNC path to profiles locations (%U username substitution) # Just set it to a null string if you want to use the smb.conf 'logon path' # directive and/or disable roaming profiles # Ex: userProfile="\\PDC-SMB3\profiles\%U" userProfile="\\DAEMON\profiles\%U" # Domain appended to the users "mail"-attribute # when smbldap-useradd -M is used # Ex: mailDomain="idealx.com" mailDomain="drivesource.ru" Инициализируем наш сервер директорий smbldap-populate Вывод будет примерно следующим Populating LDAP directory for domain DRIVESOURCE (S-1-5-21-4205727931-4131263253-1851132061) (using builtin directory structure) entry dc=drivesource,dc=ru already exist. adding new entry: ou=Users,dc=drivesource,dc=ru adding new entry: ou=Groups,dc=drivesource,dc=ru adding new entry: ou=Computers,dc=drivesource,dc=ru adding new entry: ou=Idmap,dc=drivesource,dc=ru adding new entry: uid=root,ou=Users,dc=drivesource,dc=ru adding new entry: uid=nobody,ou=Users,dc=drivesource,dc=ru adding new entry: cn=Domain Admins,ou=Groups,dc=drivesource,dc=ru adding new entry: cn=Domain Users,ou=Groups,dc=drivesource,dc=ru adding new entry: cn=Domain Guests,ou=Groups,dc=drivesource,dc=ru adding new entry: cn=Domain Computers,ou=Groups,dc=drivesource,dc=ru adding new entry: cn=Administrators,ou=Groups,dc=drivesource,dc=ru adding new entry: cn=Account Operators,ou=Groups,dc=drivesource,dc=ru adding new entry: cn=Print Operators,ou=Groups,dc=drivesource,dc=ru adding new entry: cn=Backup Operators,ou=Groups,dc=drivesource,dc=ru adding new entry: cn=Replicators,ou=Groups,dc=drivesource,dc=ru adding new entry: sambaDomainName=DRIVESOURCE,dc=drivesource,dc=ru Please provide a password for the domain root: Changing UNIX and samba passwords for root New password: Retype new password: В процессе инициализации создается учетная запись администратора домена с логином **root** для которого собственно и запрашивается пароль!