[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help Sobre Windows 7 com samba PDC + ldap + pam +



Olá Maiquel, Flávio e Galera.

agradecido pelo ajuda e uma das coisa que coloquei no smb.conf foi o que o Flávio me falou e ficou tudo ok

grato desde já.
---------------------------------
<<@@ Tenha uma Longa ViDa @@>>
                   Rodrigo Batista
               Cel:. 011-7865-6291


2010/8/31 Rodrigo Batista <batista.bat@gmail.com>
Pinta-Silva:/etc/default# cat slapd
# Default location of the slapd.conf file. If empty, use the compiled-in
# default (/etc/ldap/slapd.conf). If using the cn=config backend to store
# configuration in LDIF, set this variable to the directory containing the
# cn=config data.
SLAPD_CONF=

# System account to run the slapd server under. If empty the server
# will run as root.
SLAPD_USER="openldap"

# System group to run the slapd server under. If empty the server will
# run in the primary group of its user.
SLAPD_GROUP="openldap"

# Path to the pid file of the slapd server. If not set the init.d script
# will try to figure it out from $SLAPD_CONF (/etc/ldap/slapd.conf by
# default)
SLAPD_PIDFILE=

# slapd normally serves ldap only on all TCP-ports 389. slapd can also
# service requests on TCP-port 636 (ldaps) and requests via unix
# sockets.
# Example usage:
# SLAPD_SERVICES="ldap://127.0.0.1:389/ ldaps:/// ldapi:///"

# If SLAPD_NO_START is set, the init script will not start or restart
# slapd (but stop will still work).  Uncomment this if you are
# starting slapd via some other means or if you don't want slapd normally
# started at boot.
#SLAPD_NO_START=1

# If SLAPD_SENTINEL_FILE is set to path to a file and that file exists,
# the init script will not start or restart slapd (but stop will still
# work).  Use this for temporarily disabling startup of slapd (when doing
# maintenance, for example, or through a configuration management system)
# when you don't want to edit a configuration file.
SLAPD_SENTINEL_FILE=/etc/ldap/noslapd

# For Kerberos authentication (via SASL), slapd by default uses the system
# keytab file (/etc/krb5.keytab).  To use a different keytab file,
# uncomment this line and change the path.
#export KRB5_KTNAME=/etc/krb5.keytab

# Additional options to pass to slapd
SLAPD_OPTIONS=""




---------------------------------
<<@@ Tenha uma Longa ViDa @@>>
                   Rodrigo Batista
               Cel:. 011-7865-6291


2010/8/31 Rodrigo Batista <batista.bat@gmail.com>
@Pinta-Silva:/etc/samba# vim /etc/ldap/slapd.conf
# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.

#######################################################################
# Global Directives:

# Features to permit
#allow bind_v2

# Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/samba.schema
include         /etc/ldap/schema/misc.schema

# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile         /var/run/slapd/slapd.pid

# List of arguments that were passed to the server
argsfile        /var/run/slapd/slapd.args
root@Pinta-Silva:/etc/samba# cat /etc/ldap/slapd.conf
# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.

#######################################################################
# Global Directives:

# Features to permit
#allow bind_v2

# Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/samba.schema
include         /etc/ldap/schema/misc.schema

# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile         /var/run/slapd/slapd.pid

# List of arguments that were passed to the server
argsfile        /var/run/slapd/slapd.args

# Read slapd.conf(5) for possible values
loglevel        none

# Where the dynamically loaded modules are stored
modulepath      /usr/lib/ldap
moduleload      back_hdb

# The maximum number of entries that is returned for a search operation
sizelimit 500

# The tool-threads parameter sets the actual amount of cpu's that is used
# for indexing.
tool-threads 1

#######################################################################
# Specific Backend Directives for hdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend         hdb

#######################################################################
# Specific Backend Directives for 'other':
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
#backend                <other>

#######################################################################
# Specific Directives for database #1, of type hdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database        hdb

# The base of your directory in database #1

suffix          "dc=svrcalibra,dc=com,dc=br"

# rootdn directive for specifying a superuser on the database. This is needed
# for syncrepl.
rootdn          "cn=admin,dc=svrcalibra,dc=com,dc=br"
rootpw          {MD5}bgslkfB3ugOYWriuLlgewg==

# Where the database file are physically stored for database #1
directory       "/var/lib/ldap"

# The dbconfig settings are used to generate a DB_CONFIG file the first
# time slapd starts.  They do NOT override existing an existing DB_CONFIG
# file.  You should therefore change these settings in DB_CONFIG directly
# or remove DB_CONFIG and restart slapd for changes to take effect.

# For the Debian package we use 2MB as default but be sure to update this
# value if you have plenty of RAM
dbconfig set_cachesize 0 2097152 0

# Sven Hartge reported that he had to set this value incredibly high
# to get slapd running at all. See http://bugs.debian.org/303057 for more
# information.

# Number of objects that can be locked at the same time.
dbconfig set_lk_max_objects 1500
# Number of locks (both requested and granted)
dbconfig set_lk_max_locks 1500
# Number of lockers
dbconfig set_lk_max_lockers 1500

# Indexing options for database #1
index objectClass                       eq,pres
index ou,cn,sn,mail,givenname           eq,pres,sub
index uidNumber,gidNumber,memberUid     eq,pres
index loginShell                        eq,pres
## required to support pdb_getsampwnam
index uid                               pres,sub,eq
## required to support pdb_getsambapwrid()
index displayName                       pres,sub,eq
index nisMapName,nisMapEntry            eq,pres,sub
index sambaSID                          eq
index sambaPrimaryGroupSID              eq
index sambaDomainName                   eq
index default                           sub
index uniqueMember                      eq
index sambaGroupType                    eq
index sambaSIDList                      eq

# Save the time that the entry gets modified, for database #1
lastmod         on

# Checkpoint the BerkeleyDB database periodically in case of system
# failure and to speed slapd shutdown.
checkpoint      512 30

# Where to store the replica logs for database #1
# replogfile    /var/lib/ldap/replog

# The userPassword by default can be changed
# by the entry owning it if they are authenticated.
# Others should not be able to see it, except the
# admin entry below
# These access lines apply to database #1 only


# users can authenticate and change their password
access to attrs=userPassword,sambaNTPassword,sambaLMPassword,sambaPwdMustChange,sambaPwdLastSet
        by self write
        by anonymous auth
        by * none

# those 2 parameters must be world readable for password aging to work correctly
# (or use a priviledge account in /etc/ldap.conf to bind to the directory)
access to attrs=shadowLastChange,shadowMax
        by self write
        by * read

# all others attributes are readable to everybody
access to *
        by * read


###access to attrs=userPassword,shadowLastChange
###        by dn="cn=admin,dc=svrcalibra,dc=com,dc=br" write
###        by anonymous auth
###        by self write
###        by * none

# Ensure read access to the base for things like
# supportedSASLMechanisms.  Without this you may
# have problems with SASL not knowing what
# mechanisms are available and the like.
# Note that this is covered by the 'access to *'
# ACL below too but if you change that as people
# are wont to do you'll still need this if you
# want SASL (and possible other things) to work
# happily.
###access to dn.base="" by * read

# The admin dn has full write access, everyone else
# can read everything.
###access to *
###        by dn="cn=admin,dc=svrcalibra,dc=com,dc=br" write
###        by * read

# For Netscape Roaming support, each user gets a roaming
# profile for which they have write access to
#access to dn=".*,ou=Roaming,o=morsnet"
#        by dn="cn=admin,dc=svrcalibra,dc=com,dc=br" write
#        by dnattr=owner write

#######################################################################
# Specific Directives for database #2, of type 'other' (can be hdb too):
# Database specific directives apply to this databasse until another
# 'database' directive occurs
#database        <other>

# The base of your directory for database #2
#suffix         "dc=debian,dc=org"





---------------------------------
<<@@ Tenha uma Longa ViDa @@>>
                   Rodrigo Batista
               Cel:. 011-7865-6291


2010/8/31 Rodrigo Batista <batista.bat@gmail.com>
apareceu mais ainda nao vai

Pinta-Silva:/etc/samba# netstat -tnlp

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:36836           0.0.0.0:*               LISTEN      1055/rpc.statd
tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN      1914/slapd
tcp        0      0 127.0.0.1:139           0.0.0.0:*               LISTEN      2206/smbd
tcp        0      0 192.168.0.100:139       0.0.0.0:*               LISTEN      2206/smbd

tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1044/portmap
tcp        0      0 192.168.0.100:53        0.0.0.0:*               LISTEN      1155/named
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1155/named
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1169/sshd
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      1155/named
tcp        0      0 127.0.0.1:445           0.0.0.0:*               LISTEN      2206/smbd
tcp        0      0 192.168.0.100:445       0.0.0.0:*               LISTEN      2206/smbd

tcp6       0      0 :::389                  :::*                    LISTEN      1914/slapd
tcp6       0      0 ::1:139                 :::*                    LISTEN      2206/smbd
tcp6       0      0 fe80::216:3eff:fe00:139 :::*                    LISTEN      2206/smbd

tcp6       0      0 :::80                   :::*                    LISTEN      1569/apache2
tcp6       0      0 :::53                   :::*                    LISTEN      1155/named
tcp6       0      0 :::22                   :::*                    LISTEN      1169/sshd
tcp6       0      0 ::1:953                 :::*                    LISTEN      1155/named
tcp6       0      0 ::1:445                 :::*                    LISTEN      2206/smbd
tcp6       0      0 fe80::216:3eff:fe00:445 :::*                    LISTEN      2206/smbd



vc tem msn para que a gente possa conversa melhor.



---------------------------------
<<@@ Tenha uma Longa ViDa @@>>
                   Rodrigo Batista
               Cel:. 011-7865-6291


Em 31 de agosto de 2010 15:24, Maiquel Consalter <maiquelconsalter@gmail.com> escreveu:

Eu tive esse problema, não esta subindo a porta 139 smbd, responsável pela autenticação e tals. 
adicione essa configuração ao seu smb.conf

interfaces = lo eth0
bind interfaces _only_ = yes

De um restart no serviço smb/samba e verifique se a porta 139 
consta no netstat,. 


2010/8/31 Rodrigo Batista <batista.bat@gmail.com>
netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:36836           0.0.0.0:*               LISTEN      1055/rpc.statd
tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN      1914/slapd
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1044/portmap
tcp        0      0 192.168.0.100:53        0.0.0.0:*               LISTEN      1155/named
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1155/named
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1169/sshd
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      1155/named
tcp6       0      0 :::389                  :::*                    LISTEN      1914/slapd
tcp6       0      0 :::139                  :::*                    LISTEN      1523/smbd
tcp6       0      0 :::80                   :::*                    LISTEN      1569/apache2
tcp6       0      0 :::53                   :::*                    LISTEN      1155/named
tcp6       0      0 :::22                   :::*                    LISTEN      1169/sshd
tcp6       0      0 ::1:953                 :::*                    LISTEN      1155/named
tcp6       0      0 :::445                  :::*                    LISTEN      1523/smbd


---------------------------------
<<@@ Tenha uma Longa ViDa @@>>
                   Rodrigo Batista
               Cel:. 011-7865-6291


2010/8/31 Maiquel Consalter <maiquelconsalter@gmail.com>

execute o netstat -tnlp e me envie. Quero ver se esta abrindo conexão para os servços.


2010/8/31 Rodrigo Batista <batista.bat@gmail.com>

[global]
        netbios name = CALIBRA
        workgroup = SVRCALIBRA
        guest account = nobody
        browseable = yes
        server string = samba ldap server
#
# estas opções abaixo apresentaram alguns, erros, se quiser, pode testar
# separadamente, eu estou sem tempo no momento para corrigir
#
#       hosts allow = 192.168.10. 127.0.0.
#       interfaces = eth0, lo
#       remote announce = [192.168.10.255]
#       bind interfaces _only_ = yes

        wins support = yes
        name resolve order = wins lmhosts bcast host
        time server = yes
        log file = /var/log/samba/log.%m
        syslog = 1
        log level = 1
        os level = 200
        security = user
        obey pam restrictions = yes
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        domain master = yes
        preferred master = yes
        local master = yes
        domain logons = Yes
        guest ok = yes
        case sensitive = no
        hide dot files = yes

        logon script = \\CALIBRA\netlogon\logon.bat
        logon home = \\%L\%U
        logon path = \\%N\profiles\%U
        logon drive = R:

        preserve case = no
        short preserve case = no
        default case = lower
        load printers = yes
        printcap name = CUPS
        printing = CUPS

        passdb backend = ldapsam:ldap://127.0.0.1:389
        ldap passwd sync = yes
        ldap suffix = dc=svrcalibra,dc=com,dc=br
        ldap admin dn =  cn=admin,dc=svrcalibra,dc=com,dc=br
        ldap group suffix = ou=groups
        ldap user suffix = ou=users
        ldap machine suffix = ou=computers
        ldap idmap suffix = ou=users
        add user script = /usr/sbin/smbldap-useradd -m "%u"
        ldap delete dn = Yes
        add machine script = /usr/sbin/smbldap-useradd -w "%u"
        add group script = /usr/sbin/smbldap-groupadd -p "%g"
        add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
        set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"



## Samba com W7 - Teste
#Level0 oplocks = no
#ntlm auth = YES
#lanman auth = YES
#client ntlmv0 auth = YES
## Samba com W7 - Teste.


[printers]
        comment = Impressoras
        printable = yes
        path = /var/spool/samba
        browseable = no
        guest ok = yes
        public = yes
        read _only_ = yes
        writable = no
;       create mask = 0700
        use client driver = yes

[homes]
        comment = Home Directories
        browseable = yes
;       browseable = no
        writable = yes
        create mask = 0700
        directory mask = 0700

[netlogon]
        comment = Network Logon Services
        path = /etc/samba/netlogon
;       guest ok = yes
;       locking = no
;       writable = no
;       share modes = no
        public = no
        browseable = no
        read _only_ = yes
;       printable = no
;       Level2 oplocks = yes
;       write list = "@Domains Admins"


[profiles]
        comment = Roaming Profiles Folder
        path = /fileserver/profiles
        read _only_ = no
;       Browserable = no
        profile acls = yes


















---------------------------------
<<@@ Tenha uma Longa ViDa @@>>
                   Rodrigo Batista
               Cel:. 011-7865-6291


Em 31 de agosto de 2010 15:02, Rodrigo Batista <batista.bat@gmail.com> escreveu:

já fiz e nao deu certo.

 net getlocalsid
[2010/08/31 14:58:24,  0] lib/smbldap.c:690(smb_ldap_start_tls)

  Failed to issue the StartTLS instruction: Protocol error
SID for domain CAL is: S-1-5-21-504039972-2025785800-4197324826



vou providenciar mais segui este link.


http://edin.no-ip.com/content/ldap-samba-pdc-pamnss-debian-lenny-howto










---------------------------------
<<@@ Tenha uma Longa ViDa @@>>
                   Rodrigo Batista
               Cel:. 011-7865-6291


Em 31 de agosto de 2010 14:48, Maiquel Consalter <maiquelconsalter@gmail.com> escreveu:

Certo, estranho, desconfio que o LDAP esteja parado mesmo. Da um restart nos serviços, 
e tente logar novamente. Caso não funcione, envie o smb.conf.

Em 31 de agosto de 2010 14:46, Rodrigo Batista <batista.bat@gmail.com> escreveu:

Tem maquina que entra no dominio e outras nao.

ja estou olhando no Ldap mais ainda nao achei o erro.



---------------------------------
<<@@ Tenha uma Longa ViDa @@>>
                   Rodrigo Batista
               Cel:. 011-7865-6291


Em 31 de agosto de 2010 14:43, Maiquel Consalter <maiquelconsalter@gmail.com> escreveu:

Não não é preciso fazer no XP. Cara acho que esta com problema no  ldap.. 
veja isso. " Connection to LDAP server failed for the 1 try!"


Em 31 de agosto de 2010 14:40, Rodrigo Batista <batista.bat@gmail.com> escreveu:

ainda nao cheguei a alterar a chave do w7 porque estou tendo problema no XP.

ou é necessario fazer isso no xp


tail /var/log/auth.log
Aug 31 14:18:09 Pinta-Silva su[1479]: pam_unix(su:session): session opened for user clamav by (uid=0)
Aug 31 14:18:10 Pinta-Silva su[1479]: pam_unix(su:session): session closed for user clamav
Aug 31 14:18:10 Pinta-Silva su[1479]: pam_unix(su:session): session closed for user clamav
Aug 31 14:29:18 Pinta-Silva login[1130]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Aug 31 14:29:18 Pinta-Silva login[1130]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Aug 31 14:29:18 Pinta-Silva login[1680]: ROOT LOGIN  on 'xvc0'
Aug 31 14:39:01 Pinta-Silva CRON[1769]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 31 14:39:01 Pinta-Silva CRON[1769]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 31 14:39:02 Pinta-Silva CRON[1769]: pam_unix(cron:session): session closed for user root
Aug 31 14:39:02 Pinta-Silva CRON[1769]: pam_unix(cron:session): session closed for user root


tail /var/log/samba/log.pc-teste
[2010/08/31 14:38:55,  1] lib/smbldap.c:1265(another_ldap_try)
  Connection to LDAP server failed for the 1 try!
[2010/08/31 14:38:56,  0] lib/smbldap.c:690(smb_ldap_start_tls)
  Failed to issue the StartTLS instruction: Protocol error
[2010/08/31 14:38:56,  1] lib/smbldap.c:1265(another_ldap_try)
  Connection to LDAP server failed for the 1 try!
[2010/08/31 14:38:57,  0] rpc_server/srv_netlog_nt.c:387(get_md4pw)
  get_md4pw: Workstation PC-TESTE$: account does not have a password
[2010/08/31 14:38:57,  0] rpc_server/srv_netlog_nt.c:584(_netr_ServerAuthenticate3)
  _netr_ServerAuthenticate3: failed to get machine password for account PC-TESTE$: NT_STATUS_LOGON_FAILURE




---------------------------------
<<@@ Tenha uma Longa ViDa @@>>
                   Rodrigo Batista
               Cel:. 011-7865-6291


Em 31 de agosto de 2010 14:30, Maiquel Consalter <maiquelconsalter@gmail.com> escreveu:

Que tipo de pau?.. Consta algo nos logs? Vc alterou/adicionou as chaves no registro conforme o Wiki?

Em 31 de agosto de 2010 14:28, Rodrigo Batista <batista.bat@gmail.com> escreveu:

Atualizei o samba para 3.4 e agora esta dando pau.


o que pode ser


---------------------------------
<<@@ Tenha uma Longa ViDa @@>>
                   Rodrigo Batista
               Cel:. 011-7865-6291


Em 31 de agosto de 2010 12:06, Maiquel Consalter <maiquelconsalter@gmail.com> escreveu:
Talvez ajude.
wiki.samba.org/index.php/Windows7

Em 31 de agosto de 2010 12:05, Rodrigo Batista <batista.bat@gmail.com> escreveu:

Olá galera alguem tem algum tutorial de como poder integar o w7 no ldap.


ja tenho um ambiente desse e esta rodando perfeiro com xp mais acredito que para windows 7 nao esta apto ainda.

quem pode me ajudar.
---------------------------------
<<@@ Tenha uma Longa ViDa @@>>
                   Rodrigo Batista
               Cel:. 011-7865-6291



--
Att,
Maiquel




--
Att,
Maiquel




--
Att,
Maiquel




--
Att,
Maiquel





--
Att,
Maiquel




--
Att,
Maiquel





Reply to: