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

RES: SAMBA + LDAP



  Thiago,

  Uso aqui na empresa Debian Etch, LDAP e Samba.
  Quando instalei fiz uma cola para lembrar o que foi feito, segue no final
para dar uma olhada.
  Lógico que não é um material didático, mas acho que vai ser útil

  Rogério Naressi

Instituto de Pesquisas e Estudos Florestais - 40 anos
Avenida Pádua Dias, 11 - 13.400-970 - Piracicaba, SP
Caixa Postal 530 - Telefone: (19) 2105-8620
Visite nosso site: http://www.ipef.br 
  
_______________________________________
De: Thiago [mailto:brito.tb@gmail.com] 
Enviada em: quarta-feira, 16 de abril de 2008 18:59
Para: debian-user-portuguese@lists.debian.org
Assunto: SAMBA + LDAP

Boa noite pessoal, tudo bem? 
Estive lendo a lista de discurssão mas ainda não consigo fazer com que tanto
Clientes Linux e Windows se conectem em um Servidor Linux (Debian). Vocês
podem me indicar algum endereço ou me passar alguma apostila onde ensine
como eu possa fazer tudo (Configurar Servidor com Samba, LDAP e PAM; E os
Clientes WINDOWS e LINUX (UBUNTU) )?
Espero contar com a ajuda de vocês.
Até mais pessoal,
--------------------------------------------------------------------------

I N S T R U Ç Õ E S
===================

Apache, PHP, PHPLdapAdmin:
- apt-get install apache2 apache2-doc ssl-cert
- incluir AddDefaultCharset ISO-8859-1 em /etc/apache2/conf.d/charset
- mkdir /etc/apache/ssl
- acrescentado -days 365 no script make-ssl-cert
- make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem 
- a2enmod ssl authnz_ldap
- Listen 443 em /etc/apache2/ports.conf
- configurar arquivo defaul do apache conforme desejado
- apt-get install php5 php-pear php5-ldap
- apt-get install phpldapadmin libapache2-mod-php5
- /etc/php5/apache2/php.ini incluir extension=ldap.so
- /etc/phpldapadmin/config.php definir $ldapservers->...('dc=aaa,dc=bbb') e
não usar tls

Certificado (instrucoes openLDAPsegura):
- apt-get install openssl
- /usr/lib/ssl/openssl.cnf definir unique_subject = no
- mkdir /root/certificados e copiar script para gerar
- /usr/lib/ssl/misc/CA.sh -newca
- openssl req -new -nodes -keyout newreq.pem -out newreq.pem
- /usr/lib/ssl/misc/CA.sh -sign
- cp demoCA/cacert.pem /etc/ldap/certificados/cacert.pem
- cp newcert.pem /etc/ldap/certificados/servercrt.pem
- cp newreq.pem /etc/ldap/certificados/serverkey.pem
- chmod 644 /etc/ldap/certificados/serverkey.pem

OpenLDAP:
- apt-get install slapd ldap-utils db4.2-util
- dpkg-reconfigure slapd
  Omit OpenLDAP server configuration? NO
  DNS domain name: aaa.bbb
  Name of your organization: AAA
  Database backend to use: BDB
  Do you want your database to be removed when slapd is purged? NO
  Move old database? YES
  Allow LDAPv2 protocol? NO
- instrucoes itens 1 a 4 LDAP /usr/share/doc/smbldap-tools/README.Debian
- /etc/ldap/slapd.conf 
  - TLSCACertificateFile /etc/ldap/certificados/cacert.pem
  - TLSCertificateFile /etc/ldap/certificados/servercrt.pem
  - TLSCertificateKeyFile /etc/ldap/certificados/serverkey.pem
- /etc/default/slapd:
  - SLAPD_CONF=/etc/ldap/slapd.conf
  - SLAPD_SERVICES="ldap://127.0.0.1:389/ ldaps://ip_do_seu_servidor:636/
ldapi:////"
- /etc/ldap/ldap.conf:
  - PORT 636
  - TLS_CACERT /etc/ldap/certificados/cacert.pem
  - TLS_REQCERT demand
 
Samba, smbldap-tools:
- apt-get install samba samba-doc smbldap-tools
- instrucoes itens 1 a 5 SAMBA /usr/share/doc/smbldap-tools/README.Debian
- net getlocalsid SID para pegar o SID
- instrucoes itens 1 a 5 SMBLDAP-TOOLS
/usr/share/doc/smbldap-tools/README.Debian
- ldaptls="1" (alterar certificado)
- smbldap-populate

Acesso:
- apt-get install libnss-ldap nscd libpam-ldap
- dpkg-reconfigure libnss-ldap
  LDAP server Uniform Resource Identifier: ldap://127.0.0.1/
  Distinguished name of the search base: dc=aaa,dc=bbb
  Does the LDAP database require login? no
  Special LDAP privileges for root? yes 
  Make the configuration file readable/writeable by its owner only? yes
- alterar /etc/nsswitch.conf: acrescentar ldap na frente de passwd, group
  (exemplo: /usr/share/doc/libnss-ldap/examples/nsswitch.ldap)
- dpkg-reconfigure libpam-ldap
  LDAP server Uniform Resource Identifier: ldap://127.0.0.1/
  Distinguished name of the search base: dc=aaa,dc=bbb
  Make local root Database admin: yes
  Does the LDAP database require login? no
  Local crypt to use when changing passwords. crypt
- alterar /etc/pam.d/common-{account,auth,password} (item 6 site
www.nomis52.net)


Material para consulta:
http://www.debian-administration.org/articles/349
http://www.ldap.org.br/modules/ldap/files/files///openldap+tls-ssl.pdf
http://www.nomis52.net/?section=docs&page=samldap


Reply to: