статья ldap+samba+ddns+dhcp [бета-версия]
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
- fox
- ст. лейтенант
- Сообщения: 1154
- Зарегистрирован: 2008-07-24 0:25:31
- Откуда: Ukraine, Donetsk
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Всех убью, один останусь!
Услуги хостинговой компании Host-Food.ru
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/
- fox
- ст. лейтенант
- Сообщения: 1154
- Зарегистрирован: 2008-07-24 0:25:31
- Откуда: Ukraine, Donetsk
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Код: Выделить всё
/var/db/samba
Код: Выделить всё
/usr/local/etc/samba
Код: Выделить всё
smbpasswd -w password_root_ldap
Посмотрим, что получиться, если и тогда откажеть попробовать рестартнуть самбу... и снова попробовать втыкать!
Всех убью, один останусь!
-
- рядовой
- Сообщения: 30
- Зарегистрирован: 2009-03-04 19:13:15
- Откуда: Москва
- Контактная информация:
Re: статья ldap+samba+ddns+dhcp [бета-версия]
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
О машинке:
Код: Выделить всё
router# uname -a
FreeBSD router.ojkh 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Tue May 5 11:20:20 UTC 2009 root@:/usr/src/sys/i386/compile/myi386 i386
Код: Выделить всё
router# smbclient -V
Version 3.3.9
Код: Выделить всё
router# /usr/local/libexec/slapd -V
@(#) $OpenLDAP: slapd 2.4.20 (Dec 16 2009 12:03:49) $
Собственно суть вот в чем:
Код: Выделить всё
router# smbclient -L localhost -U admin%admin
Receiving SMB: Server stopped responding
session setup failed: Call timed out: server did not respond after 20000 milliseconds
router# smbclient -L 192.168.12.7 -U admin%admin
Domain=[OJKH] OS=[Unix] Server=[Samba 3.3.9]
tree connect failed: NT_STATUS_ACCESS_DENIED
уже настолько все переиначил что и не помню с чего начинал... :-)
не видиться моя машинка с адресом 192.168.12.7 в качестве :
Код: Выделить всё
router# testparm
Load smb config files from /usr/local/etc/smb.conf
Processing section "[printers]"
Processing section "[netlogon]"
Processing section "[pub]"
Processing section "[IPC$]"
Processing section "[GroupPolicy]"
Processing section "[Profiles]"
Processing section "[user_data]"
Processing section "[all]"
Processing section "[trash]"
Processing section "[printers]"
Loaded services file OK.
Server role: [b][i]ROLE_DOMAIN_PDC[/i][/b]
Подскажите - где искать причину ?
- fox
- ст. лейтенант
- Сообщения: 1154
- Зарегистрирован: 2008-07-24 0:25:31
- Откуда: Ukraine, Donetsk
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Всех убью, один останусь!
- fox
- ст. лейтенант
- Сообщения: 1154
- Зарегистрирован: 2008-07-24 0:25:31
- Откуда: Ukraine, Donetsk
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Насчёт переуставить новую, это ты напрасно ну если есть возможность перестовляй, но мне кажеться тут ошибка в конфигах, не вздумай их бекапить, заново лучше наресуй, если не получиться я тебе свои выложу...Corvin74 писал(а):Убийство самбовских баз, рестарт и создание другого пользователя ни к чему не привели Короче, попробую переставить систему, а там посмотрим...
Всех убью, один останусь!
-
- рядовой
- Сообщения: 30
- Зарегистрирован: 2009-03-04 19:13:15
- Откуда: Москва
- Контактная информация:
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Бекап-то сделал, но чисто для истории, быдет время попробую разобраться сравнить... А сейчас машинка нужна срочно, поэтому буду лабать конфиги с нуля...Насчёт переуставить новую, это ты напрасно ну если есть возможность перестовляй, но мне кажеться тут ошибка в конфигах, не вздумай их бекапить, заново лучше наресуй, если не получиться я тебе свои выложу...
По результатам отпишусь...
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Если мне, то:fox писал(а):Клади конфиг сабы, будем смотреть...
Код: Выделить всё
[global]
dos charset = CP866
unix charset = KOI8-R
display charset = KOI8-R
workgroup = OJKH
realm = ROUTER.OJKH.LAN
server string = Router Samba Server
interfaces = 192.168.12.7, 127.0.0.1
bind interfaces only = Yes
map to guest = Bad User
password server = 192.168.12.7
smb passwd file =
passdb backend = ldapsam:ldap://127.0.0.1/
log level = 3
log file = /var/log/samba/log.%m
max log size = 50
smb ports = 139 445
name resolve order = lmhosts wins dns host bcast
time server = Yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
load printers = No
printcap name = PrintCap
add user script = /usr/local/sbin/ldapadduser '%u' users
rename user script = /usr/local/sbin/ldaprenameuser '%uold' '%unew'
delete user script = /usr/local/sbin/ldapdeleteuser '%u'
add group script = /usr/local/sbin/ldapaddgroup '%g'
delete group script = /usr/local/sbin/ldapdeletegroup '%g'
add user to group script = /usr/local/sbin/ldapaddusertogroup '%u' '%g'
delete user from group script = /usr/local/sbin/ldapdeleteuserfromgroup '%u' '%g'
set primary group script = /usr/local/sbin/ldapsetprimarygroup '%u' '%g'
add machine script = /usr/local/sbin/ldapaddmachine '%u' computers
logon drive = H:
domain logons = Yes
os level = 64
preferred master = Yes
domain master = Yes
wins proxy = Yes
wins support = Yes
ldap admin dn = "cn=root,dc=ojkh,dc=lan"
ldap group suffix = ou=groups
ldap machine suffix = ou=computers
ldap passwd sync = yes
ldap suffix = dc=ojkh,dc=lan
ldap ssl = no
ldap user suffix = ou=users
ldap debug level = 1
usershare path = /var/home/samba/shares/all
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind separator = @
winbind enum users = Yes
winbind enum groups = Yes
winbind use default domain = Yes
valid users = @domain\group
admin users = admin
csc policy = disable
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[netlogon]
comment = Network Logon Service
path = /usr/local/etc/samba/netlogon
guest ok = Yes
browseable = No
[pub]
comment = Share
path = /var/home/samba/pub
valid users = @users
read only = No
create mask = 0666
directory mask = 0777
guest ok = Yes
[IPC$]
path = /tmp
[GroupPolicy]
path = /var/home/GroupPolicy
guest only = Yes
browseable = No
[Profiles]
path = /var/home/samba/profiles/%u
read only = No
create mask = 0600
directory mask = 0700
browseable = No
locking = No
[user_data]
comment = Shares for personal users data
path = /var/home/samba/shares/user_data
admin users = "@DOMAIN\Domain Admins"
read only = No
create mask = 0600
directory mask = 0700
force unknown acl user = Yes
locking = No
root preexec = /bin/sh -c '/root/scripts/create_user_data_subdir.sh %U'
vfs objects = recycle, full_audit
recycle:repository = /var/home/samba/shares/trash/%S
recycle:keeptree = Yes
recycle:touch = Yes
recycle:touch_mtime = Yes
recycle:version = Yes
recycle:maxsize = 0
recycle:exclude = *.TMP *.tmp
recycle:directory_mode = 0770
recycle:versions = Yes
recycle:minsize = 1
full_audit:prefix = share=%S; id=%U; ip=%I -->
full_audit:success = unlink rmdir mkdir write rename write aio_write pwrite
full_audit:failure = unlink rmdir mkdir write rename write aio_write pwrite
full_audit:priority = INFO
[all]
path = /var/home/samba/shares/all
admin users = "@DOMAIN\Domain Admins"
read list = "@DOMAIN\Domain Users"
write list = "@DOMAIN\Domain Users"
read only = No
create mask = 0660
directory mask = 0770
force unknown acl user = Yes
map acl inherit = Yes
map archive = No
map readonly = no
delete readonly = Yes
vfs objects = recycle, full_audit
recycle:repository = /var/home/samba/shares/trash/%S
recycle:keeptree = Yes
recycle:touch = Yes
recycle:touch_mtime = Yes
recycle:version = Yes
recycle:maxsize = 0
recycle:exclude = *.TMP *.tmp
recycle:directory_mode = 0770
recycle:versions = Yes
recycle:minsize = 1
full_audit:prefix = share=%S; id=%U; ip=%I -->
full_audit:success = unlink rmdir mkdir write rename write aio_write pwrite
full_audit:failure = unlink rmdir mkdir write rename write aio_write pwrite
full_audit:priority = INFO
[trash]
path = /var/home/samba/shares/trash
admin users = "@DOMAIN\Domain Admins"
read list = "@DOMAIN\Domain Admins"
write list = "@DOMAIN\Domain Admins"
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Как то не доводилось вживую использовать, а тут уперся в элементарное..
Подскажите у кого такое было..
-
- подполковник
- Сообщения: 3927
- Зарегистрирован: 2008-09-04 11:51:25
- Откуда: Санкт-Петербург
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Код: Выделить всё
realm
password server
А также всякое упоминание о winbind, потом добавищ если надо будет.
Нелохо бы еще и nsswitsh.conf показать, а также работают ли getent passwd, getent group, id <имя пользователя в домене>
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Большое спасибо за участие ! :-)snorlov писал(а):Для начала убратьЕсли хочется, чтобы он себя показывал в сетевом окружении используй netbios name = ...Код: Выделить всё
realm password server
А также всякое упоминание о winbind, потом добавищ если надо будет.
Нелохо бы еще и nsswitsh.conf показать, а также работают ли getent passwd, getent group, id <имя пользователя в домене>
а вот это мне вообще не понятно:
Код: Выделить всё
router# findsmb
*=DMB
+=LMB
IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION
---------------------------------------------------------------------
router# findsmb
*=DMB
+=LMB
IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION
---------------------------------------------------------------------
192.168.12.7 ROUTER [OJKH] [Unix] [Samba 3.3.9]
192.168.12.7 ROUTER [OJKH] [Unix] [Samba 3.3.9]
убираю
и ВСЕ упоминания о winbind в конфиге :-)realm
password server
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
getent passwd | grep 1000
Код: Выделить всё
router# getent passwd|grep 1000
admin:*:10001:10002:admin:/var/home/samba/homes/admin:/usr/sbin/nologin
testuser:*:10002:10002:testuser:/var/home/samba/homes/testuser:/usr/sbin/nologin
user:*:10007:10007:testuser:/var/home/samba/homes/user:/usr/sbin/nologin
Код: Выделить всё
router# getent group | grep 1000
admins:*:10001
users:*:10002
computers:*:10003
Код: Выделить всё
router# id testuser
uid=10002(testuser) gid=10002(users) groups=10002(users)
router# id admin
uid=10001(admin) gid=10002(users) groups=10002(users)
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Код: Выделить всё
router# id admin
uid=10008(admin) gid=10001(admins) groups=10001(admins)
router# smbpasswd -a admin
New SMB password:
Retype new SMB password:
Код: Выделить всё
router# cat nss_ldap.conf
#!/bin/sh
base dc=ojkh,dc=lan
uri ldap://127.0.0.1/
ldap_version 3
binddn cn=root,dc=ojkh,dc=lan
bindpw root
scope one
nss_base_passwd ou=users,dc=ojkh,dc=lan?one
nss_base_group ou=groups,dc=ojkh,dc=lan?one
nss_base_passwd ou=computers,dc=ojkh,dc=lan?one
nss_base_shadow ou=users,dc=ojkh,dc=lan?one
bind_timelimit 10
# Search timelimit.
timelimit 30
bind_policy soft
nss_connect_policy persist
# Idle timelimit. nslcd will close connections if the
# server has not been contacted for the number of seconds.
idle_timelimit 3600
nss_paged_results yes
# NDS mappings
#map group uniqueMember member
# Mappings for Services for UNIX 3.5
#filter passwd (objectClass=User)
#map passwd uid msSFU30Name
#map passwd userPassword msSFU30Password
#map passwd homeDirectory msSFU30HomeDirectory
#map passwd homeDirectory msSFUHomeDirectory
#filter shadow (objectClass=User)
#map shadow uid msSFU30Name
#map shadow userPassword msSFU30Password
#filter group (objectClass=Group)
#map group uniqueMember msSFU30PosixMember
# Mappings for Active Directory
pagesize 1000
referrals off
filter passwd (&(objectClass=user)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*))
map passwd uid sAMAccountName
map passwd homeDirectory unixHomeDirectory
map passwd gecos displayName
filter shadow (&(objectClass=user)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*))
map shadow uid sAMAccountName
map shadow shadowLastChange pwdLastSet
filter group (objectClass=group)
map group uniqueMember member
Код: Выделить всё
router# cat /etc/nsswitch.conf
#
# nsswitch.conf(5) - name service switch configuration file
# $FreeBSD: src/etc/nsswitch.conf,v 1.1.8.1 2009/04/15 03:14:26 kensmith Exp $
#
group: files ldap
group_compat: nis
shadow: files ldap
hosts: files dns
networks: files
passwd: files ldap
passwd_compat: nis
shells: files
services: compat
services_compat: nis
protocols: files
rpc: files
r
-
- подполковник
- Сообщения: 3927
- Зарегистрирован: 2008-09-04 11:51:25
- Откуда: Санкт-Петербург
Re: статья ldap+samba+ddns+dhcp [бета-версия]
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Код: Выделить всё
http://www.lissyara.su/articles/freebsd/programms/ldap+samba_pdc+ddns+dhcp/
Код: Выделить всё
router# net rpc join -S router -U admin%admin
Connection failed: NT_STATUS_INVALID_HANDLE
Could not connect to server router
Connection failed: NT_STATUS_INVALID_HANDLE
Код: Выделить всё
router# testparm
Load smb config files from /usr/local/etc/smb.conf
Processing section "[printers]"
Processing section "[netlogon]"
Processing section "[pub]"
Processing section "[IPC$]"
Processing section "[GroupPolicy]"
Processing section "[Profiles]"
Processing section "[user_data]"
Processing section "[all]"
Processing section "[trash]"
Processing section "[printers]"
Loaded services file OK.
Server role: ROLE_DOMAIN_PDC
в общем вот :
Код: Выделить всё
router# net rpc join -S router -U admin%admin
Connection failed: NT_STATUS_INVALID_HANDLE
Could not connect to server router
Connection failed: NT_STATUS_INVALID_HANDLE
Код: Выделить всё
router# net rpc testjoin -U admin%admin
[2009/12/16 20:41:42, 0] libsmb/namequery.c:internal_resolve_name(1609)
resolve_name: unknown name switch type dns
Unable to find a suitable server for domain OJKH
Join to domain 'OJKH' is not valid: NT_STATUS_UNSUCCESSFUL
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Код: Выделить всё
router# findsmb
*=DMB
+=LMB
IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION
---------------------------------------------------------------------
192.168.12.7 ROUTER *[OJKH] [Unix] [Samba 3.3.9]
192.168.12.7 ROUTER *[OJKH] [Unix] [Samba 3.3.9]
Код: Выделить всё
router# net rpc join -S router -Uadmin
Connection failed: NT_STATUS_LOGON_FAILURE
Enter admin's password:
Could not connect to server router
Connection failed: NT_STATUS_ACCESS_DENIED
- f0s
- ст. лейтенант
- Сообщения: 1082
- Зарегистрирован: 2007-03-13 18:43:31
- Откуда: Санкт-Петербург
- Контактная информация:
Re: статья ldap+samba+ddns+dhcp [бета-версия]
[FidoNet 2:550/2 && 2:5030/4441]
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
вот вывод:
Код: Выделить всё
router# hostname
router.ojkh
Код: Выделить всё
router# ping router
PING router (192.168.12.7): 56 data bytes
64 bytes from 192.168.12.7: icmp_seq=0 ttl=64 time=0.369 ms
Код: Выделить всё
router# ping router.ojkh
PING router (192.168.12.7): 56 data bytes
64 bytes from 192.168.12.7: icmp_seq=0 ttl=64 time=0.026 ms
Код: Выделить всё
router# ping router.ojkh.lan
PING router (192.168.12.7): 56 data bytes
64 bytes from 192.168.12.7: icmp_seq=0 ttl=64 time=0.029 ms
- fox
- ст. лейтенант
- Сообщения: 1154
- Зарегистрирован: 2008-07-24 0:25:31
- Откуда: Ukraine, Donetsk
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Тогда вот ещё нюанс:
Код: Выделить всё
workgroup = OJKH
realm = ROUTER.OJKH.LAN
Всех убью, один останусь!
- fox
- ст. лейтенант
- Сообщения: 1154
- Зарегистрирован: 2008-07-24 0:25:31
- Откуда: Ukraine, Donetsk
Re: статья ldap+samba+ddns+dhcp [бета-версия]
smb.conf
Код: Выделить всё
#======================= Global Settings =====================================
[global]
workgroup = dramteatr.local
netbios name = pdc
server string = Domain Controll Server PDC
security = user
encrypt passwords = yes
load printers = no
admin users = sa
#hosts allow = 192.168.16. 192.168.32. 192.168.64. 127.
bind interfaces only = yes
interfaces = 192.168.16.254 192.168.32.254 192.168.64.254 127.0.0.1
log file = /var/log/samba/samba.log
max log size = 50000
passdb backend = ldapsam:ldap://192.168.32.254
ldap suffix = dc=dramteatr,dc=local
ldap user suffix = ou=users
ldap group suffix = ou=groups
ldap machine suffix = ou=computers
ldap admin dn = "cn=root,dc=dramteatr,dc=local"
ldap delete dn = no
ldap ssl = off
winbind uid = 5000-9999
winbind gid = 5000-9999
winbind separator = @
winbind use default domain = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
local master = yes
os level = 255
domain master = yes
preferred master = yes
domain logons = yes
# Пустое значение - неперемещаемые профили.
logon path =
logon home = \\%L\homes
logon drive = H:
add machine script = /usr/local/bin/ldapaddmachine '%u' computers
add user script = /usr/local/bin/ldapadduser '%u' users
add group script = /usr/local/bin/ldapaddgroup '%g'
add user to group script = /usr/local/bin/ldapaddusertogroup '%u' '%g'
delete user script = /usr/local/bin/ldapdeleteuser '%u'
delete group script = /usr/local/bin/ldapdeletegroup '%g'
delete user from group script = /usr/local/bin/ldapdeleteuserfromgroup '%u' '%g'
set primary group script = /usr/local/bin/ldapsetprimarygroup '%u' '%g'
rename user script = /usr/local/bin/ldaprenameuser '%uold' '%unew
wins support = yes
wins proxy = yes
#wins server = 192.168.16.254 192.168.32.254 192.168.64.254
dns proxy = yes
dos charset = KOI8-U
unix charset = KOI8-U
#display charset = koi8-r
#unix charset = koi8-r
#dos charset = cp866
time server = yes
#============================ Share Definitions ==============================
........................................
Код: Выделить всё
group: files ldap
group_compat: nis
hosts: files dns
networks: files
passwd: files ldap
passwd_compat: nis
shells: files
Код: Выделить всё
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include /usr/local/etc/openldap/schema/misc.schema
include /usr/local/etc/openldap/schema/nis.schema
include /usr/local/etc/openldap/schema/openldap.schema
include /usr/local/etc/openldap/schema/samba.schema
include /usr/local/etc/openldap/schema/dnszone.schema
include /usr/local/etc/openldap/schema/dhcp.schema
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
# Load dynamic backend modules:
modulepath /usr/local/libexec/openldap
# moduleload back_bdb
# moduleload back_ldap
moduleload back_ldbm
# moduleload back_passwd
# moduleload back_shell
#######################################################################
# BDB database definitions
#######################################################################
database ldbm
suffix "dc=dramteatr,dc=local"
rootdn "cn=root,dc=dramteatr,dc=local"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw {SSHA}f8d/R7/RepaKiL49KVWp8/MfCIeIBBjx
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
loglevel 256
directory /var/db/openldap-data
# Indices to maintain
#index objectClass eq
index objectClass,uid,uidNumber,gidNumber eq
index cn,mail,surname,givenname eq,subinitial
index sambaSID eq
index sambaPrimaryGroupSID eq
index sambaDomainName eq
access to attrs=userPassword
by self write
by anonymous auth
by * none
access to attrs=sambaLMPassword,sambaNTPassword
by dn="cn=root,dc=dramteatr,dc=local" write
by * none
access to *
by self write
by anonymous read
by * none
Код: Выделить всё
host 127.0.0.1
base dc=dramteatr,dc=local
uri ldap://127.0.0.1/
ldap_version 3
binddn cn=root,dc=dramteatr,dc=local
bindpw fortero
port 389
scope one
timelimit 30
bind_timelimit 10
bind_policy soft
nss_connect_policy persist
idle_timelimit 3600
nss_paged_results yes
pagesize 1000
nss_base_passwd ou=users,dc=dramteatr,dc=local?one
nss_base_group ou=groups,dc=dramteatr,dc=local?one
nss_base_passwd ou=computers,dc=dramteatr,dc=local?one
nss_base_shadow ou=users,dc=dramteatr,dc=local?one
Код: Выделить всё
# LDAP Configuration
SERVER="127.0.0.1"
BINDDN="cn=root,dc=dramteatr,dc=local"
# The following file contains the raw password of the binddn
# Create it with something like : echo -n 'secret' > $BINDPWDFILE
# WARNING !!!! Be careful not to make this file world-readable
#BINDPWDFILE="/usr/local/etc/ldapscripts/ldapscripts.passwd"
# For older versions of OpenLDAP, it is still possible to use
# unsecure command-line passwords by defining the following option
# AND commenting the previous one (BINDPWDFILE takes precedence)
BINDPWD="fortero"
SUFFIX="dc=dramteatr,dc=local" # Global suffix
GSUFFIX="ou=groups" # Groups ou (just under $SUFFIX)
USUFFIX="ou=users" # Users ou (just under $SUFFIX)
MSUFFIX="ou=computers" # Machines ou (just under $SUFFIX)
# Start with these IDs *if no entry found in LDAP*
GIDSTART="10000" # Group ID
UIDSTART="10000" # User ID
MIDSTART="20000" # Machine ID
# User properties
USHELL="/bin/sbin/nologin"
UHOMES="/home/samba/homes/%u" # You may use %u for username here
ASKGECOS="no"
CREATEHOMES="yes" # Create home directories and set rights ?
HOMESKEL="/etc/skel" # Directory where the skeleton files are located. Ignored if undefined or nonexistant.
HOMEPERMS="700" # Default permissions for home directories
RECORDPASSWORDS="yes"
PASSWORDFILE="/var/log/ldapscripts_passwd.log"
# Where to log
LOGFILE="/var/log/ldapscripts.log"
# Temporary folder
#TMPDIR="/tmp"
# OpenLDAP client commands
LDAPSEARCHBIN="/usr/local/bin/ldapsearch"
LDAPADDBIN="/usr/local/bin/ldapadd"
LDAPDELETEBIN="/usr/local/bin/ldapdelete"
LDAPMODIFYBIN="/usr/local/bin/ldapmodify"
LDAPMODRDNBIN="/usr/local/bin/ldapmodrdn"
LDAPPASSWDBIN="/usr/local/bin/ldappasswd"
GETENTPWCMD=""
GETENTGRCMD=""
GTEMPLATE=""
UTEMPLATE=""
MTEMPLATE=""
Напешите о результате, этот конф с боевого сервера!
Всех убью, один останусь!
-
- рядовой
- Сообщения: 30
- Зарегистрирован: 2009-03-04 19:13:15
- Откуда: Москва
- Контактная информация:
Re: статья ldap+samba+ddns+dhcp [бета-версия]
По результатам буду отписываться.
Код: Выделить всё
/home/corvin/>uname -a
FreeBSD gw8.guguzvao.local 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
/home/corvin/>pkg_info
cups-client-1.4.2_3 Common UNIX Printing System: Library cups
db44-4.4.20.4 The Berkeley DB package, revision 4.4
ldapscripts-1.9.0 Scripts to manage posix accounts in an OpenLDAP directory
nss_ldap-1.264_3 RFC 2307 NSS module
openldap-client-2.3.43 Open source LDAP client implementation
openldap-server-2.3.43 Open source LDAP server implementation
samba-3.0.37,1 A free SMB and CIFS client and server for UNIX
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
fox писал(а):Ещё не работает?
Тогда вот ещё нюанс:и нет биос делай в маленьком регистре, убери большие буквы!Код: Выделить всё
realm = ROUTER.OJKH.LAN
сделал в конфиге
Код: Выделить всё
workgroup = OJKH
Код: Выделить всё
testparm | grep workgroup
и все равно в итоге:
Код: Выделить всё
router# net rpc join -S router -U admin%admin
Connection failed: NT_STATUS_LOGON_FAILURE
Could not connect to server router
Connection failed: NT_STATUS_ACCESS_DENIED
Код: Выделить всё
router# net rpc testjoin -U admin%admin
[2009/12/16 23:26:54, 0] libsmb/namequery.c:internal_resolve_name(1609)
resolve_name: unknown name switch type dns
[2009/12/16 23:27:05, 0] libsmb/clientgen.c:cli_receive_smb(165)
Receiving SMB: Server stopped responding
Connection failed: NT_STATUS_IO_TIMEOUT
Join to domain 'OJKH' is not valid: NT_STATUS_IO_TIMEOUT
Код: Выделить всё
router# findsmb
*=DMB
+=LMB
IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION
---------------------------------------------------------------------
192.168.12.7 ROUTER *[OJKH] [Unix] [Samba 3.3.9]
192.168.12.7 ROUTER *[OJKH] [Unix] [Samba 3.3.9]
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
тут я не догнал..fox писал(а):Ещё не работает?
и нет биос делай в маленьком регистре, убери большие буквы!
Код: Выделить всё
и нет биос делай в маленьком регистре, убери большие буквы
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
Код: Выделить всё
router# pkg_info|grep cups-client
cups-client-1.4.2_1 Common UNIX Printing System: Library cups
router# pkg_info | grep db4
db46-4.6.21.4 The Berkeley DB package, revision 4.6
router# pkg_info | grep ldapscripts
ldapscripts-1.9.0 Scripts to manage posix accounts in an OpenLDAP directory
router# pkg_info | grep nss_ldap
nss_ldap-1.264_3 RFC 2307 NSS module
nss_ldapd-0.6.11_1 Advanced fork of nss_ldap
router# pkg_info | grep openldap-client
openldap-client-2.4.20 Open source LDAP client implementation
router# pkg_info | grep openldap-server
openldap-server-2.4.20 Open source LDAP server implementation
router# pkg_info | grep samba
samba-3.3.9 A free SMB and CIFS client and server for UNIX
samba-pdbsql-0.3.1_1 Multiplexor, MySQL and PostgeSQL passdb backends for Samba3
Код: Выделить всё
nss_ldap-1.264_3 RFC 2307 NSS module
nss_ldapd-0.6.11_1 Advanced fork of nss_ldap
-
- проходил мимо
Re: статья ldap+samba+ddns+dhcp [бета-версия]
поменял конфиги наfox писал(а):Для страждущих, рабочие боевые конфиги:
smb.confКод: Выделить всё
;;;;;;;;****************************;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;**********************
Код: Выделить всё
router# net rpc info -U admin%admin
Could not connect to server PDC
The username or password was not correct.
Connection failed: NT_STATUS_LOGON_FAILURE
router# findsmb
*=DMB
+=LMB
IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION
---------------------------------------------------------------------
192.168.12.7 PDC *[OJKH.LAN] [Unix] [Samba 3.3.9]
192.168.12.7 PDC *[OJKH.LAN] [Unix] [Samba 3.3.9]
router# net rpc info -U admin%admin
Could not connect to server PDC
The username or password was not correct.
Connection failed: NT_STATUS_LOGON_FAILURE
router# net rpc testjoin -U admin%admin
[2009/12/17 00:08:04, 0] libsmb/clientgen.c:cli_receive_smb(165)
Receiving SMB: Server stopped responding
Connection failed: NT_STATUS_IO_TIMEOUT
Join to domain 'OJKH.LAN' is not valid: NT_STATUS_IO_TIMEOUT
1. пароль в slapd.conf - поменялСмотрите внимательно, можите скопировать и просто свои значения подставить не забывайте, пароли вбивать в конфиги, а так же если надумаете копи-паст делать, то грохните самбовски базы и в варах и в этц...
Напешите о результате, этот конф с боевого сервера!
2 значениt
поменял на:dc=dramteatr,dc=local
3.dc=ojkh,dc=lan
вот тут не могу сообразить..грохните самбовски базы