Slack00
(usa Slackware)
Enviado em 28/07/2014 - 12:21h
Bom Dia danielmb, segue meu smb.conf e meu slapd.conf para dar uma olhada.
SMB.CONF
[global]
workgroup = TRIX
netbios name = SUBLIME
server string = Servidor de Arquivos TRIX
name resolve order = wins bcast
deadtime = 10
log level = 1
log file = /var/log/samba/log.%m
max log size = 5000
debug pid = yes
debug uid = yes
syslog = 0
utmp = yes
security = user
domain logons = yes
domain master = yes
preferred master = yes
domain logons = yes
admin users = root
passdb backend = ldapsam:"ldap://127.0.0.1"
ldap admin dn = cn=Manager,dc=trix,dc=com,dc=br
ldap ssl = off
ldap delete dn = no
## Sync UNIX password with Samba password
## Method 1:
ldap password sync = yes
ldap suffix = dc=trix,dc=com,dc=br
ldap user suffix = ou=Usuarios
ldap group suffix = ou=Grupos
ldap machine suffix = ou=Computadores
ldap idmap suffix = ou=Idmap
[NETLOGON]
path = /var/lib/samba/netlogon
browseable = no
share modes = no
[PROFILES]
path = /var/lib/samba/profiles
browseable = no
writeable = yes
create mask = 0611
directory mask = 0700
profile acls = yes
csc policy = disable
map system = yes
map hidden = yes
########################################################################
SLDAP.CONF
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/collective.schema
include /etc/openldap/schema/corba.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/duaconf.schema
include /etc/openldap/schema/dyngroup.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/java.schema
include /etc/openldap/schema/misc.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/openldap.schema
include /etc/openldap/schema/ppolicy.schema
#include /etc/openldap/schema/ldapns.schema
include /etc/openldap/schema/pmi.schema
include /etc/openldap/schema/samba.schema
#
# Local de armazenamento dos dados de PID e afins
#
pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
#
# Parametros para fazer o ldappasswd gerar hashes no formato Crypt/MD5
#
password-hash {CRYPT}
password-crypt-salt-format "$1$%.8s"
access to attrs=userPassword
by self write
by dn="cn=nssuser,dc=trix,dc=com,dc=br" read
by anonymous auth
access to attrs=sambaLMPassword,sambaNTPassword
by self write
by anonymous auth
access to *
by * read
access to attrs=userPassword,shadowLastChange,sambaLmPassword,sambaNtPassword
by dn="cn=nssuser,dc=trix,dc=com,dc=br" write
by anonymous auth
by self write
by * none
#
# Tipo de backend que o OpenLDAP vai usar. Por padrao, eh bdb (Berkeley DB) no OpenLDAP 2.1.x
#
database bdb
#
# Nome da organizacao
#
suffix "dc=trix,dc=com,dc=br"
#
# Quem eh o super-usuario do diretorio
#
rootdn "cn=Manager,dc=trix,dc=com,dc=br"
rootpw {SSHA}Ii2F8NSYT14oquY+8BHYawYrwiZ7UxcU
directory /home/openldap-data
#
index objectClass eq,pres
index sambaSID eq
index sambaPrimaryGroupSID eq
index sambaDomainName eq
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
A respeito dos logs no log.samba e log.smbd não logam nada apenas no /var/log/debug que loga a consulta
segue o resultado do debug(log).
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=16 MOD attr=sambaPwdHistoryLength
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=16 RESULT tag=103 err=17 text=sambaPwdHistoryLength: attribute type undefined
Jul 28 11:39:07 terremoto slapd[6809]: conn=1381 op=10 SRCH base="dc=trix,dc=com,dc=br" scope=2 deref=0 filter="(&(objectClass=posixAccount)(uid=root))"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1381 op=10 SRCH attr=uid userPassword uidNumber gidNumber cn homeDirectory loginShell gecos description objectClass
Jul 28 11:39:07 terremoto slapd[6809]: conn=1381 op=10 SEARCH RESULT tag=101 err=0 nentries=1 text=
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=17 SRCH base="dc=trix,dc=com,dc=br" scope=2 deref=0 filter="(&(objectClass=sambaGroupMapping)(gidNumber=500))"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=17 SRCH attr=gidNumber sambaSID sambaGroupType sambaSIDList description displayName cn objectClass
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=17 SEARCH RESULT tag=101 err=0 nentries=1 text=
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=18 SRCH base="dc=trix,dc=com,dc=br" scope=2 deref=0 filter="(&(objectClass=sambaGroupMapping)(gidNumber=500))"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=18 SRCH attr=gidNumber sambaSID sambaGroupType sambaSIDList description displayName cn objectClass
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=18 SEARCH RESULT tag=101 err=0 nentries=1 text=
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=19 SRCH base="sambaDomainName=TRIX,dc=trix,dc=com,dc=br" scope=0 deref=0 filter="(objectClass=sambaDomain)"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=19 SRCH attr=sambaPwdHistoryLength
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=19 SEARCH RESULT tag=101 err=0 nentries=1 text=
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=20 MOD dn="sambaDomainName=TRIX,dc=trix,dc=com,dc=br"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=20 MOD attr=sambaPwdHistoryLength
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=20 RESULT tag=103 err=17 text=sambaPwdHistoryLength: attribute type undefined
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=21 SRCH base="sambaDomainName=TRIX,dc=trix,dc=com,dc=br" scope=0 deref=0 filter="(objectClass=sambaDomain)"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=21 SRCH attr=sambaPwdHistoryLength
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=21 SEARCH RESULT tag=101 err=0 nentries=1 text=
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=22 MOD dn="sambaDomainName=TRIX,dc=trix,dc=com,dc=br"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=22 MOD attr=sambaPwdHistoryLength
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=22 RESULT tag=103 err=17 text=sambaPwdHistoryLength: attribute type undefined
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=23 SRCH base="dc=trix,dc=com,dc=br" scope=2 deref=0 filter="(&(uid=root)(objectClass=sambaSamAccount))"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=23 SRCH attr=uid uidNumber gidNumber homeDirectory sambaPwdLastSet sambaPwdCanChange sambaPwdMustChange sambaLogonTime sambaLogo
ffTime sambaKickoffTime cn sn displayName sambaHomeDrive sambaHomePath sambaLogonScript sambaProfilePath description sambaUserWorkstations sambaSID sambaPrimaryGroupSID sambaLMPass
word sambaNTPassword sambaDomainName objectClass sambaAcctFlags sambaMungedDial sambaBadPasswordCount sambaBadPasswordTime sambaPasswordHistory modifyTimestamp sambaLogonHours modi
fyTimestamp uidNumber gidNumber homeDirectory loginShell gecos
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=23 SEARCH RESULT tag=101 err=0 nentries=0 text=
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=24 SRCH base="dc=trix,dc=com,dc=br" scope=2 deref=0 filter="(&(objectClass=sambaGroupMapping)(|(displayName=root)(cn=root)))"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=24 SRCH attr=gidNumber sambaSID sambaGroupType sambaSIDList description displayName cn objectClass
Jul 28 11:39:07 terremoto slapd[6809]: <= bdb_equality_candidates: (displayName) not indexed
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=24 SEARCH RESULT tag=101 err=0 nentries=0 text=
Jul 28 11:39:07 terremoto slapd[6809]: conn=1381 op=11 SRCH base="dc=trix,dc=com,dc=br" scope=2 deref=0 filter="(&(objectClass=posixAccount)(uid=root))"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1381 op=11 SRCH attr=uid userPassword uidNumber gidNumber cn homeDirectory loginShell gecos description objectClass
Jul 28 11:39:07 terremoto slapd[6809]: conn=1381 op=11 SEARCH RESULT tag=101 err=0 nentries=1 text=
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=25 SRCH base="dc=trix,dc=com,dc=br" scope=2 deref=0 filter="(&(uid=root)(objectClass=sambaSamAccount))"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=25 SRCH attr=uid uidNumber gidNumber homeDirectory sambaPwdLastSet sambaPwdCanChange sambaPwdMustChange sambaLogonTime sambaLogo
ffTime sambaKickoffTime cn sn displayName sambaHomeDrive sambaHomePath sambaLogonScript sambaProfilePath description sambaUserWorkstations sambaSID sambaPrimaryGroupSID sambaLMPass
word sambaNTPassword sambaDomainName objectClass sambaAcctFlags sambaMungedDial sambaBadPasswordCount sambaBadPasswordTime sambaPasswordHistory modifyTimestamp sambaLogonHours modi
fyTimestamp uidNumber gidNumber homeDirectory loginShell gecos
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=25 SEARCH RESULT tag=101 err=0 nentries=0 text=
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=26 SRCH base="dc=trix,dc=com,dc=br" scope=2 deref=0 filter="(&(objectClass=sambaGroupMapping)(|(displayName=root)(cn=root)))"
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=26 SRCH attr=gidNumber sambaSID sambaGroupType sambaSIDList description displayName cn objectClass
Jul 28 11:39:07 terremoto slapd[6809]: <= bdb_equality_candidates: (displayName) not indexed
Jul 28 11:39:07 terremoto slapd[6809]: conn=1383 op=26 SEARCH RESULT tag=101 err=0 nentries=0 text=
Jul 28 11:39:21 terremoto slapd[6809]: conn=1383 fd=15 closed (connection lost)
Jul 28 11:47:01 terremoto slapd[6809]: conn=1384 fd=15 ACCEPT from IP=127.0.0.1:57392 (IP=0.0.0.0:389)
Jul 28 11:47:01 terremoto slapd[6809]: conn=1384 op=0 BIND dn="" method=128
Jul 28 11:47:01 terremoto slapd[6809]: conn=1384 op=0 RESULT tag=97 err=0 text=
Jul 28 11:47:01 terremoto slapd[6809]: conn=1384 op=1 SRCH base="dc=trix,dc=com,dc=br" scope=2 deref=0 filter="(&(objectClass=posixAccount)(uid=root))"
Jul 28 11:47:01 terremoto slapd[6809]: conn=1384 op=1 SEARCH RESULT tag=101 err=0 nentries=0 text=
Jul 28 11:47:01 terremoto slapd[6809]: conn=1384 op=2 SRCH base="dc=trix,dc=com,dc=br" scope=2 deref=0 filter="(&(objectClass=posixGroup)(memberUid=root))"
Jul 28 11:47:01 terremoto slapd[6809]: conn=1384 op=2 SRCH attr=gidNumber
Jul 28 11:47:01 terremoto slapd[6809]: conn=1384 op=2 SEARCH RESULT tag=101 err=0 nentries=0 text=
Jul 28 11:47:01 terremoto slapd[6809]: conn=1384 fd=15 closed (connection lost)
A configuração dos dois serviços estão corretas?
para a integração funcionar mesmo eu administrando o OpenLdap pelo LAM (interface web) eu preciso ter o smbtools instalado e configurado?
Aguardo.