Форум русскоязычного сообщества Ubuntu


Увидели сообщение с непонятной ссылкой, спам, непристойность или оскорбление?
Воспользуйтесь ссылкой «Сообщить модератору» рядом с сообщением!

Автор Тема: [Wiki] [HOWTO] Настройка Samba 3(PDC)+OpenLDAP2.4+Gosa2.6.11 в Ubuntu 10.04  (Прочитано 68941 раз)

0 Пользователей и 2 Гостей просматривают эту тему.

Оффлайн ivanov_ivan

  • Новичок
  • *
  • Сообщений: 4
    • Просмотр профиля
В самой доке есть ответ на ваш вопрос
"
Если после перезагрузки ldap не запустился, а в syslog присутствует main: TLS init def ctx failed: -1, это ошибка конфигурации, проверьте содержимое файла /etc/ldap/slapd.d/cn=config.ldif правильно ли в нём указаны пути и названия сертификатов и убедитесь в том что группа ssl-cert имеет возможность читать закрытый ключ /etc/ssl/private/ldap01_slapd_key.pem
"
Внимательно переделайте все начиная с пункта
"Далее включаем шифрование для нашего LDAP."
Поставил пакет ssl-certs и сделал по инструкции и заработало. Но в чем подвох? Ведь slapd запускается от имени openldap такие права я и ставил на файл, почему не работало? (Ктати я и права 777 ставил, все равно не работало) Не подскажите?

Оффлайн KapitanNemo

  • Новичок
  • *
  • Сообщений: 31
    • Просмотр профиля
Ну тут только два варианта.
1. Имя сертификата всетаки было указано где то неверно. Это вероятнее всего.
2. Ошибка при генерации самих сертификатов. Что маловероятно.

Оффлайн Gavrik85

  • Новичок
  • *
  • Сообщений: 5
    • Просмотр профиля
Добрый день, возникла задача поднятия Сервера с доменом.Использовал мануал https://help.ubuntu.ru/wiki/samba_pdc_ldap_ubuntu_10_04

дошел до
Заполняем нашу базу
ldapadd -x -D cn=admin,dc=example,dc=com -W -f sambadb.ldif, где вместо dc=example,dc=com стоит своё.При данной команде выходит след.

adding new entry "dc=XXX,dc=XXX"
ldap_add: Other (e.g., implementation specific) error (80)

После этого
smbldap-passwd -a admins,где admins своё
выдает ошибку

internal error at /usr/share/perl5/smbldap_tools.pm line 406.

Подскажите плиз,что за ошибка и как её лечить?

Оффлайн KapitanNemo

  • Новичок
  • *
  • Сообщений: 31
    • Просмотр профиля
Покажи db.ldif
/etc/samba/smb.conf
/usr/share/doc/smbldap-tools/vsmbldap.conf

Оффлайн Gavrik85

  • Новичок
  • *
  • Сообщений: 5
    • Просмотр профиля
структура db.ldif

dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: back_hdb.la

dn: olcDatabase={1}hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=vebrr,dc=ru
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=vebrr,dc=ru
olcRootPW: {MD5}3FGDF0JcnLLnIds8QDxaBQ==
olcDbConfig: set_cachesize 0 2097152 0
olcDbConfig: set_lk_max_objects 1500
olcDbConfig: set_lk_max_locks 1500
olcDbConfig: set_lk_max_lockers 1500
olcDbIndex: objectClass eq
olcLastMod: TRUE
olcDbCheckpoint: 512 30
olcAccess: to attrs=sambaNTPassword,sambaLMPassword,sambaPwdMustChange,sambaPwdLastSet,userPassword by dn="cn=admin,dc=vebrr,dc=ru" write by anonymous auth by self write by * none
olcAccess: to attrs=shadowLastChange by self write by * read
olcAccess: to dn.base="" by * read
olcAccess: to dn.subtree="" by * read
olcAccess: to * by dn="cn=admin,dc=vebrr,dc=ru" write by * read

Пользователь решил продолжить мысль 25 Января 2012, 11:08:48:
smb.conf

#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.
# A well-established practice is to name the original file
# "smb.conf.master" and create the "real" config file with
# testparm -s smb.conf.master >smb.conf
# This minimizes the size of the really used smb.conf file
# which, according to the Samba Team, impacts performance
# However, use this with caution if your smb.conf file contains nested
# "include" statements. See Debian bug #483187 for a case
# where using a master file is not a good idea.
#

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
   server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
#   wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
;   name resolve order = lmhosts host wins bcast

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes



#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
#   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
#   security = user

# You may wish to use password encryption.  See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
   encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using. 
   passdb backend = tdbsam

   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
   map to guest = bad user

########## Domains ###########

# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
;   domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of the user's profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
#   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the
# SAMR RPC pipe. 
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe. 
; add group script = /usr/sbin/addgroup --force-badname %g

########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
#   load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
;   printing = bsd
;   printcap name = /etc/printcap

# CUPS printing.  See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
;   printing = cups
;   printcap name = cups

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192
#   socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
#   domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

# The following was the default behaviour in sarge,
# but samba upstream reverted the default because it might induce
# performance issues in large organizations.
# See Debian bug #368251 for some of the consequences of *not*
# having this setting and smb.conf(5) for details.
;   winbind enum groups = yes
;   winbind enum users = yes

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
;   usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
   usershare allow guests = yes

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home director as \\server\username
;[homes]
;   comment = Home Directories
;   browseable = no

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
;   read only = yes

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
;   create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
;   directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server. Un-comment the following parameter
# to make sure that only "username" can connect to \\server\username
# The following parameter makes sure that only "username" can connect
#
# This might need tweaking when using external authentication schemes
;   valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
;   comment = Samba server's CD-ROM
;   read only = yes
;   locking = no
;   path = /cdrom
;   guest ok = yes

# The next two parameters show how to auto-mount a CD-ROM when the
#   cdrom share is accesed. For this to work /etc/fstab must contain
#   an entry like this:
#
#       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
#   is mounted on /cdrom
#
;   preexec = /bin/mount /cdrom
;   postexec = /bin/umount /cdrom



Пользователь решил продолжить мысль 25 Января 2012, 11:10:41:
vsmbldap.conf такого файла нет
« Последнее редактирование: 25 Января 2012, 11:10:41 от Gavrik85 »

Оффлайн KapitanNemo

  • Новичок
  • *
  • Сообщений: 31
    • Просмотр профиля
Сори /etc/smbldap-tools/smbldap.conf

Оффлайн Gavrik85

  • Новичок
  • *
  • Сообщений: 5
    • Просмотр профиля

# $Source: /opt/cvs/samba/smbldap-tools/configure.pl,v $
# $Id: configure.pl,v 1.17 2005/07/05 09:05:16 jtournier Exp $
#
# smbldap-tools.conf : Q & D configuration file for smbldap-tools

#  This code was developped by IDEALX (http://IDEALX.org/) and
#  contributors (their names can be found in the CONTRIBUTORS file).
#
#                 Copyright (C) 2001-2002 IDEALX
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
#  USA.

#  Purpose :
#       . be the configuration file for all smbldap-tools scripts

##############################################################################
#
# General Configuration
#
##############################################################################

# 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-3681282570-1670994417-2872265618"

# Domain name the Samba server is in charged.
# If not defined, parameter is taking from smb.conf configuration file
# Ex: sambaDomain="IDEALX-NT"
sambaDomain="vebrr"

##############################################################################
#
# LDAP Configuration
#
##############################################################################

# Notes: to use to dual ldap servers backend for Samba, you must patch
# Samba with the dual-head patch from IDEALX. If not using this patch

Пользователь решил продолжить мысль 25 Января 2012, 11:54:16:
Извиняюсь,выкладываю заново в файле....
« Последнее редактирование: 25 Января 2012, 11:54:16 от Gavrik85 »

Оффлайн KapitanNemo

  • Новичок
  • *
  • Сообщений: 31
    • Просмотр профиля
Стоп скажи список схем в /etc/ldap/schema/
И список /etc/ldap/slapd.d/cn=config/cn=schema

Помоему там проблема с конкретной схемой.
Гдето была опечатка в мануале.
Списки в студию. Сори что мучаю но мож в результате что то получится.

Все остальное до этого момента прошло без единой ошибки?

Оффлайн Gavrik85

  • Новичок
  • *
  • Сообщений: 5
    • Просмотр профиля
Да все нормально,просто надо разобраться...Может что не правильно сделал.Вот список схем:core.ldif,cosine.ldif,dyngroup.ldif,gofax.ldif,gofon.ldif,gosa-samba3.ldif,goserver.ldif,gosystem.ldif,goto.ldif,goto-mime.ldif,inetorgperson.ldif,misc.ldif,nis.ldif,openldap.ldif,samba3.ldif,trust.ldif.

Пользователь решил продолжить мысль 25 Января 2012, 17:24:02:
cn={0}core.ldif
cn={1}cosine.ldif
cn={10}goto.ldif
cn={11}goto-mime.ldif
cn={12}gosa-samba3.ldif
cn={13}gofax.ldif
cn={14}goserver.ldif
cn={2}nis.ldif
cn={3}inetorgperson.ldif
cn={4}openldap.ldif
cn={5}misc.ldif
cn={6}trust.ldif
cn={7}samba3.ldif
cn={8}gosystem.ldif
cn={9}gofon.ldif
« Последнее редактирование: 25 Января 2012, 17:24:02 от Gavrik85 »

Оффлайн KapitanNemo

  • Новичок
  • *
  • Сообщений: 31
    • Просмотр профиля
Тогда продолжим собирать инфо

ldapsearch -Zx -b ou=Users,dc=example,dc=com -D "cn=admin,dc=vebrr,dc=ru" "uid=*" -W
Что выдаст

И еще сам
sambadb.ldif на котором начались грабли.

Оффлайн Gavrik85

  • Новичок
  • *
  • Сообщений: 5
    • Просмотр профиля
ldapsearch -Zx -b ou=Users,dc=vebrr,dc=ru -D "cn=admin,dc=vebrr,dc=ru" "uid=*" -W

ldap_start_tls: Connect error (-11)
        additional info: TLS: hostname does not match CN in peer certificate
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <ou=Users,dc=vebrr,dc=ru> with scope subtree
# filter: uid=*
# requesting: ALL
#

# search result
search: 3
result: 80 Other (e.g., implementation specific) error
text: internal error

# numResponses: 1


Пользователь решил продолжить мысль 25 Января 2012, 17:40:01:
dn: dc=vebrr,dc=ru
objectClass: dcObject
objectclass: organization
o: vebrr
dc: vebrr

dn: ou=Users,dc=vebrr,dc=ru
objectClass: top
objectClass: organizationalUnit
ou: Users

dn: ou=Groups,dc=vebrr,dc=ru
objectClass: top
objectClass: organizationalUnit
ou: Groups

dn: ou=Computers,dc=vebrr,dc=ru
objectClass: top
objectClass: organizationalUnit
ou: Computers

dn: ou=Idmap,dc=vebrr,dc=ru
objectClass: top
objectClass: organizationalUnit
ou: Idmap

dn: uid=kras,ou=Users,dc=vebrr,dc=ru
cn: kras
sn: kras
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: sambaSAMAccount
objectClass: posixAccount
objectClass: shadowAccount
gidNumber: 1000
uid: kras
uidNumber: 1000
homeDirectory: /home/kras
sambaPwdLastSet: 0
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 2147483647
sambaHomeDrive: H:
sambaPrimaryGroupSID: S-1-5-21-3681282570-1670994417-2872265618-512
sambaLMPassword: XXX
sambaNTPassword: XXX
sambaAcctFlags: [U          ]
sambaSID: S-1-5-21-3681282570-1670994417-2872265618-1000
loginShell: /bin/sh
gecos: Netbios Domain Administrator

dn: uid=nobody,ou=Users,dc=vebrr,dc=ru
cn: nobody
sn: nobody
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: sambaSAMAccount
objectClass: posixAccount
objectClass: shadowAccount
gidNumber: 65534
uid: nobody
uidNumber: 65534
homeDirectory: /nonexistent
sambaPwdLastSet: 0
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 2147483647
sambaHomeDrive: H:
sambaPrimaryGroupSID: S-1-5-21-3681282570-1670994417-2872265618-514
sambaLMPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
sambaNTPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
# account disabled by default
sambaAcctFlags: [NUD        ]
sambaSID: S-1-5-21-3681282570-1670994417-2872265618-2998
loginShell: /bin/sh

dn: cn=Domain Admins,ou=Groups,dc=vebrr,dc=ru
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 512
cn: Domain Admins
memberUid: kras
description: Netbios Domain Administrators
sambaSID: S-1-5-21-3681282570-1670994417-2872265618-512
sambaGroupType: 2
displayName: Domain Admins

dn: cn=Domain Users,ou=Groups,dc=vebrr,dc=ru
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 513
cn: Domain Users
description: Netbios Domain Users
sambaSID: S-1-5-21-3681282570-1670994417-2872265618-513
sambaGroupType: 2
displayName: Domain Users

dn: cn=Domain Guests,ou=Groups,dc=vebrr,dc=ru
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 514
cn: Domain Guests
description: Netbios Domain Guests Users
sambaSID: S-1-5-21-3681282570-1670994417-2872265618-514
sambaGroupType: 2
displayName: Domain Guests

dn: cn=Domain Computers,ou=Groups,dc=vebrr,dc=ru
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 515
cn: Domain Computers
description: Netbios Domain Computers accounts
sambaSID: S-1-5-21-3681282570-1670994417-2872265618-515
sambaGroupType: 2
displayName: Domain Computers

dn: cn=Administrators,ou=Groups,dc=vebrr,dc=ru
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 544
cn: Administrators
description: Netbios Domain Members can fully administer the computer/sambaDomainName
sambaSID: S-1-5-32-544
sambaGroupType: 5
displayName: Administrators

#dn: cn=Users,ou=Groups,dc=vebrr,dc=ru
#objectClass: top
#objectClass: posixGroup
#objectClass: sambaGroupMapping
#gidNumber: 545
#cn: Users
#description: Netbios Domain Ordinary users
#sambaSID: S-1-5-32-545
#sambaGroupType: 5
#displayName: users

#dn: cn=Guests,ou=Groups,dc=vebrr,dc=ru
#objectClass: top
#objectClass: posixGroup
#objectClass: sambaGroupMapping
#gidNumber: 546
#cn: Guests
#memberUid: nobody
#description: Netbios Domain Users granted guest access to the computer/sambaDomainName
#sambaSID: S-1-5-32-546
#sambaGroupType: 5
#displayName: Guests

#dn: cn=Power Users,ou=Groups,dc=vebrr,dc=ru
#objectClass: top
#objectClass: posixGroup
#objectClass: sambaGroupMapping
#gidNumber: 547
#cn: Power Users
#description: Netbios Domain Members can share directories and printers
#sambaSID: S-1-5-32-547
#sambaGroupType: 5
#displayName: Power Users

dn: cn=Account Operators,ou=Groups,dc=vebrr,dc=ru
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 548
cn: Account Operators
description: Netbios Domain Users to manipulate users accounts
sambaSID: S-1-5-32-548
sambaGroupType: 5
displayName: Account Operators

#dn: cn=System Operators,ou=Groups,dc=vebrr,dc=ru
#objectClass: top
#objectClass: posixGroup
#objectClass: sambaGroupMapping
#gidNumber: 549
#cn: System Operators
#description: Netbios Domain System Operators
#sambaSID: S-1-5-32-549
#sambaGroupType: 5
#displayName: System Operators

dn: cn=Print Operators,ou=Groups,dc=vebrr,dc=ru
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 550
cn: Print Operators
description: Netbios Domain Print Operators
sambaSID: S-1-5-32-550
sambaGroupType: 5
displayName: Print Operators

dn: cn=Backup Operators,ou=Groups,dc=vebrr,dc=ru
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 551
cn: Backup Operators
description: Netbios Domain Members can bypass file security to back up files
sambaSID: S-1-5-32-551
sambaGroupType: 5
displayName: Backup Operators

dn: cn=Replicators,ou=Groups,dc=vebrr,dc=ru
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 552
cn: Replicators
description: Netbios Domain Supports file replication in a sambaDomainName
sambaSID: S-1-5-32-552
sambaGroupType: 5
displayName: Replicators

dn: sambaDomainName=vebrr,dc=vebrr,dc=ru
objectClass: top
objectClass: sambaDomain
objectClass: sambaUnixIdPool
sambaDomainName: vebrr
sambaSID: S-1-5-21-3681282570-1670994417-2872265618
uidNumber: 1001
gidNumber: 1001
sambaNextRid: 1000

Оффлайн KapitanNemo

  • Новичок
  • *
  • Сообщений: 31
    • Просмотр профиля

dn: uid=kras,ou=Users,dc=vebrr,dc=ru
cn: kras
sn: kras
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: sambaSAMAccount
objectClass: posixAccount
objectClass: shadowAccount
gidNumber: 1000
uid: kras
uidNumber: 1000
homeDirectory: /home/kras
sambaPwdLastSet: 0
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 2147483647
sambaHomeDrive: H:
sambaPrimaryGroupSID: S-1-5-21-3681282570-1670994417-2872265618-512
sambaLMPassword: XXX
sambaNTPassword: XXX
sambaAcctFlags: [U          ]
sambaSID: S-1-5-21-3681282570-1670994417-2872265618-1000
loginShell: /bin/sh
gecos: Netbios Domain Administrator

Это и есть твой администратор. Пользователь. крас а не admin или admins

Плюс у тебя ошибка с сертификатами
ldap_start_tls: Connect error (-11)
        additional info: TLS: hostname does not match CN in peer certificate

Начни заново с пункта
Создаём базу LDAP с которой в последствии и будем работать. Для этого создаём файл db.ldif

>db.ldif

там пропишешь нормального юзера своего.
uid=kras,ou=Users,dc=vebrr,dc=rу

Под этим юзером тебе все и надо делать. Менять не только домен.

Оффлайн tamtam

  • Новичок
  • *
  • Сообщений: 21
    • Просмотр профиля
Здравствуйте товарищи!
Помогите мне пожалуйста я уже и не знаю что делать.
У меня вся поникло на этапе рестарта slapd..

root@vpn:/etc/ssl# /etc/init.d/slapd restart
Stopping OpenLDAP: slapd.
Starting OpenLDAP: slapd - failed.
The operation failed but no output was produced. For hints on what went
wrong please refer to the system's logfiles (e.g. /var/log/syslog) or
try running the daemon in Debug mode like via "slapd -d 16383" (warning:
this will create copious output).

Below, you can find the command line options used by this script to
run slapd. Do not forget to specify those options if you
want to look to debugging output:
  slapd -h 'ldap:/// ldapi:/// ldaps:///' -g openldap -u openldap -F /etc/ldap/slapd.d/


Вот вывод hostname -f:
vpn.isp
Вот содержимое /etc/ssl/vpn.info:
root@vpn:/etc/ssl# cat vpn.info
organization = Firma
cn = vpn.isp
tls_www_server
encryption_key
signing_key

/etc/init.d/slapd restart
/var/log/syslog:
Feb  6 15:31:12 vpn slapd[2052]: <<< dnPrettyNormal: <cn={13}samba3>, <cn={13}samba3>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: <= str2entry(cn={13}samba3) -> 0x7f616d483ac8
Feb  6 15:31:12 vpn slapd[2052]: => test_filter
Feb  6 15:31:12 vpn slapd[2052]:     PRESENT
Feb  6 15:31:12 vpn slapd[2052]: => access_allowed: search access to "cn={13}samba3,cn=schema,cn=config" "objectClass" requested
Feb  6 15:31:12 vpn slapd[2052]: <= root access granted
Feb  6 15:31:12 vpn slapd[2052]: => access_allowed: search access granted by manage(=mwrscxd)
Feb  6 15:31:12 vpn slapd[2052]: <= test_filter 6
Feb  6 15:31:12 vpn slapd[2052]: ldif_read_file: read entry file: "/etc/ldap/slapd.d//cn=config/cn=schema/cn={14}samba3.ldif"
Feb  6 15:31:12 vpn slapd[2052]: => str2entry: "dn: cn={14}samba3#012objectClass: olcSchemaConfig#012cn: {14}samba3#012olcAttributeTypes: {0}( 1.3.6.1.4.1.10098.1.1.9.1 NAME 'goXdmcpIsEnabled' DESC#012  'Indicates if the server is enabled for XDMCP queries' EQUALITY caseExactIA5#012 Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )#012olcAttributeTypes: {1}( 1.3.6.1.4.1.10098.1.1.9.2 NAME 'goFontPath' DESC 'Font#012 server Entry' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26#012  )#012olcAttributeTypes: {2}( 1.3.6.1.4.1.10098.1.1.9.4 NAME 'goExportEntry' DESC 'P#012 rovides an export entry' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.#012 121.1.15 )#012olcAttributeTypes: {3}( 1.3.6.1.4.1.10098.1.1.9.9 NAME 'goSyslogSection' DESC #012 'What sections wants the server for its syslog service? i.e. *.*' EQUALITY ca#012 seExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )#012olcAttributeTypes: {4}( 1.3.6.1.4.1.10098.1.1.9.10 NAME 'goTimeSource' DESC 'L#012 ist of time sources' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.1#012 21.1.26 )#012olcAttributeTypes: {5}( 1.3.6.1.4.1.10098.1.1.9.11 NAME 'goSpoolPath' DESC 'Pr#012 ovides a spool path for printing services' EQUALITY caseExactIA5Match SYNTAX #012 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )#012olcAttributeTypes: {6}( 1.3.6.1.4.1.10098.1.1.9.12 NAME 'goLdapBase' DESC 'Bas#012 e to use for this LDAP server' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.146#012 6.115.121.1.15 SINGLE-VALUE )#012olcAttributeTypes: {7}( 1.3.6.1.4.1.10098.1.1.9.13 NAME 'goImapName' DESC 'Nam#012 e of IMAP server appearing in GOsa' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1#012 .4.1.1466.115.121.1.26 SINGLE-VALUE )#012olcAttributeTypes: {8}( 1.3.6.1.4.1.10098.1.1.9.14 NAME 'goImapConnect' DESC '#012 PHP connect string for IMAP server' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1#012 .4.1.1466.115.121.1.26 SINGLE-VALUE )#012olcAttributeTypes: {9}( 1.3.6.1.4.1.10098.1.1.9.15 NAME 'goImapAdmin' DESC 'IM#012 AP admin account' EQUALITY caseExactIA5Match
Feb  6 15:31:12 vpn slapd[2052]: >>> dnPrettyNormal: <cn={14}samba3>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnPrettyNormal: <cn={14}samba3>, <cn={14}samba3>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: <= str2entry(cn={14}samba3) -> 0x7f616d483ac8
Feb  6 15:31:12 vpn slapd[2052]: => test_filter
Feb  6 15:31:12 vpn slapd[2052]:     PRESENT
Feb  6 15:31:12 vpn slapd[2052]: => access_allowed: search access to "cn={14}samba3,cn=schema,cn=config" "objectClass" requested
Feb  6 15:31:12 vpn slapd[2052]: <= root access granted
Feb  6 15:31:12 vpn slapd[2052]: => access_allowed: search access granted by manage(=mwrscxd)
Feb  6 15:31:12 vpn slapd[2052]: <= test_filter 6
Feb  6 15:31:12 vpn slapd[2052]: ldif_read_file: read entry file: "/etc/ldap/slapd.d//cn=config/olcDatabase={-1}frontend.ldif"
Feb  6 15:31:12 vpn slapd[2052]: => str2entry: "dn: olcDatabase={-1}frontend#012objectClass: olcDatabaseConfig#012objectClass: olcFrontendConfig#012olcDatabase: {-1}frontend#012olcAccess: {0}to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external#012 ,cn=auth manage by * break#012olcAccess: {1}to dn.base="" by * read#012olcAccess: {2}to dn.base="cn=subschema" by * read#012olcSizeLimit: 500#012structuralObjectClass: olcDatabaseConfig#012entryUUID: b18d5d34-e2cb-1030-9a2a-4b68a6fb062b#012creatorsName: cn=config#012createTimestamp: 20120203155844Z#012entryCSN: 20120203155844.218155Z#000000#000#000000#012modifiersName: cn=config#012modifyTimestamp: 20120203155844Z#012"
Feb  6 15:31:12 vpn slapd[2052]: >>> dnPrettyNormal: <olcDatabase={-1}frontend>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnPrettyNormal: <olcDatabase={-1}frontend>, <olcDatabase={-1}frontend>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <cn=config>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <cn=config>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <cn=config>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <cn=config>
Feb  6 15:31:12 vpn slapd[2052]: <= str2entry(olcDatabase={-1}frontend) -> 0x7f616d483ac8
Feb  6 15:31:12 vpn slapd[2052]: => test_filter
Feb  6 15:31:12 vpn slapd[2052]:     PRESENT
Feb  6 15:31:12 vpn slapd[2052]: => access_allowed: search access to "olcDatabase={-1}frontend,cn=config" "objectClass" requested
Feb  6 15:31:12 vpn slapd[2052]: <= root access granted
Feb  6 15:31:12 vpn slapd[2052]: => access_allowed: search access granted by manage(=mwrscxd)
Feb  6 15:31:12 vpn slapd[2052]: <= test_filter 6
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <cn=subschema>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <cn=subschema>
Feb  6 15:31:12 vpn slapd[2052]: ldif_read_file: read entry file: "/etc/ldap/slapd.d//cn=config/olcDatabase={0}config.ldif"
Feb  6 15:31:12 vpn slapd[2052]: => str2entry: "dn: olcDatabase={0}config#012objectClass: olcDatabaseConfig#012olcDatabase: {0}config#012olcAccess: {0}to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external#012 ,cn=auth manage by * break#012structuralObjectClass: olcDatabaseConfig#012entryUUID: b18d6900-e2cb-1030-9a2b-4b68a6fb062b#012creatorsName: cn=config#012createTimestamp: 20120203155844Z#012entryCSN: 20120203155844.218458Z#000000#000#000000#012modifiersName: cn=config#012modifyTimestamp: 20120203155844Z#012"
Feb  6 15:31:12 vpn slapd[2052]: >>> dnPrettyNormal: <olcDatabase={0}config>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnPrettyNormal: <olcDatabase={0}config>, <olcDatabase={0}config>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <cn=config>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <cn=config>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <cn=config>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <cn=config>
Feb  6 15:31:12 vpn slapd[2052]: <= str2entry(olcDatabase={0}config) -> 0x7f616d483ac8
Feb  6 15:31:12 vpn slapd[2052]: => test_filter
Feb  6 15:31:12 vpn slapd[2052]:     PRESENT
Feb  6 15:31:12 vpn slapd[2052]: => access_allowed: search access to "olcDatabase={0}config,cn=config" "objectClass" requested
Feb  6 15:31:12 vpn slapd[2052]: <= root access granted
Feb  6 15:31:12 vpn slapd[2052]: => access_allowed: search access granted by manage(=mwrscxd)
Feb  6 15:31:12 vpn slapd[2052]: <= test_filter 6
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: /etc/ldap/slapd.d/: line 1: warning: cannot assess the validity of the ACL scope within backend naming context
Feb  6 15:31:12 vpn slapd[2052]: ldif_read_file: read entry file: "/etc/ldap/slapd.d//cn=config/olcDatabase={1}hdb.ldif"
Feb  6 15:31:12 vpn slapd[2052]: => str2entry: "dn: olcDatabase={1}hdb#012objectClass: olcDatabaseConfig#012objectClass: olcHdbConfig#012olcDatabase: {1}hdb#012olcDbDirectory: /var/lib/ldap#012olcSuffix: dc=vpn,dc=isp#012olcAccess: {0}to attrs=sambaNTPassword,sambaLMPassword,sambaPwdMustChange,samb#012 aPwdLastSet,userPassword by dn="cn=admin,dc=vpn,dc=isp" write by anonymous au#012 th by self write by * none#012olcAccess: {1}to attrs=shadowLastChange by self write by * read#012olcAccess: {2}to dn.base="" by * read#012olcAccess: {3}to dn.subtree="" by * read#012olcAccess: {4}to * by dn="cn=admin,dc=vpn,dc=isp" write by * read#012olcLastMod: TRUE#012olcRootDN: cn=admin,dc=vpn,dc=isp#012olcRootPW:: e01ENX1YcjRpbE96UTRQQ09xM2FRMHFidWFRPT0=#012olcDbCheckpoint: 512 30#012olcDbConfig: {0}set_cachesize 0 2097152 0#012olcDbConfig: {1}set_lk_max_objects 1500#012olcDbConfig: {2}set_lk_max_locks 1500#012olcDbConfig: {3}set_lk_max_lockers 1500#012olcDbIndex: objectClass eq#012olcDbIndex: uidNumber eq#012olcDbIndex: gidNumber eq#012olcDbIndex: loginShell eq#012olcDbIndex: uid eq,pres,sub#012olcDbIndex: memberUid eq,pres,sub#012olcDbIndex: uniqueMember eq,pres#012olcDbIndex: sambaSID eq#012olcDbIndex: sambaPrimaryGroupSID eq#012olcDbIndex: sambaGroupType eq#012olcDbIndex: sambaSIDList eq#012olcDbIndex: sambaDomainName eq#012olcDbIndex: default sub#012olcDbIndex: mail eq,sub#012olcDbIndex: gosaMailAlternateAddress,gosaMailForwardingAddress eq#012olcDbIndex: cn,sn,givenName,ou pres,eq,sub#012olcDbIndex: gosaSubtreeACL,gosaObject,gosaUser pres,eq#012olcDbIndex: displayName eq#012olcDbIndex: ipHostNumber eq#012olcDbIndex: postfixMyDestinations eq#012olcDbIndex: entryCSN eq#012olcDbIndex: entryUUID eq#012structuralObjectClass: olcHdbConfig#012entryUUID: f194d582-e4de-1030-9603-d1d65464a21e#012creatorsName: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth#012createTimestamp: 20120206072134Z#012entryCSN: 20120206092107.738926Z#000000#000#000000#012modifiersName: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth#012modif
Feb  6 15:31:12 vpn slapd[2052]: >>> dnPrettyNormal: <olcDatabase={1}hdb>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnPrettyNormal: <olcDatabase={1}hdb>, <olcDatabase={1}hdb>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <dc=vpn,dc=isp>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <dc=vpn,dc=isp>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <cn=admin,dc=vpn,dc=isp>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <cn=admin,dc=vpn,dc=isp>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: >>> dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>
Feb  6 15:31:12 vpn slapd[2052]: <<< dnNormalize: <gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth>

Бла бла бла бла......

Feb  6 15:31:12 vpn slapd[2052]:     2.5.13.0 (objectIdentifierMatch):
Feb  6 15:31:12 vpn slapd[2052]: matchingRuleUse: ( 2.5.13.0 NAME 'objectIdentifierMatch' APPLIES ( supportedControl $ supportedExtension $ supportedFeatures $ supportedApplicationContext ) )
Feb  6 15:31:12 vpn slapd[2052]: main: TLS init def ctx failed: -1
Feb  6 15:31:12 vpn slapd[2052]: slapd destroy: freeing system resources.
Feb  6 15:31:12 vpn slapd[2052]: slapd stopped.
Feb  6 15:31:12 vpn slapd[2052]: connections_destroy: nothing to destroy.


Пути к сертификатам указаны верно..
В общем не знаю что делать, очень нужна помощь.

Оффлайн KapitanNemo

  • Новичок
  • *
  • Сообщений: 31
    • Просмотр профиля
Читаем

В самой доке есть ответ на ваш вопрос
"
Если после перезагрузки ldap не запустился, а в syslog присутствует main: TLS init def ctx failed: -1, это ошибка конфигурации, проверьте содержимое файла /etc/ldap/slapd.d/cn=config.ldif правильно ли в нём указаны пути и названия сертификатов и убедитесь в том что группа ssl-cert имеет возможность читать закрытый ключ /etc/ssl/private/ldap01_slapd_key.pem
"
Внимательно переделайте все начиная с пункта
"Далее включаем шифрование для нашего LDAP."

Оффлайн tamtam

  • Новичок
  • *
  • Сообщений: 21
    • Просмотр профиля
С этой проблемой справился не могу справиться с новой проблемой:

Выполняю: smbldap-useradd -a -P test
А в ответ:
No such object at /usr/share/perl5/smbldap_tools.pm line 525

 

Страница сгенерирована за 0.059 секунд. Запросов: 25.