Tutorial completo de implementação de LDAP + Samba + Squid
Este tutorial destina-se a todos os administradores de redes e sistemas que queiram economizar tempo e gerenciar de uma maneira simples e segura seus usuários utilizando o LDAP (Lightweight Directory Access Protocol).
Parte 13: LAM - Ldap Account Manager
Depois de muito estudar sobre um bom front-end que pudesse me dar todas as ferramentas para uma boa administração do LDAP, acabei encontrando o LAM, mas existem várias outras ferramentas, como o PhpLdapAdmin por exemplo.
Agora vamos instalar o Ldap Account Manager. Primeiro crie o usuário e o grupo httpd:
# useradd httpd
# groupadd httpd
Depois pegue o pacote ldap-account-manager-1.0.2.tar.gz e o mova para:
# mv ldap-account-manager-1.0.2.tar.gz /usr/local/apache2/htdocs
Descompacte-o:
# tar -zxvf ldap-account-manager-1.0.2.tar.gz
Renomeie-o:
# mv ldap-account-manager-1.0.2 lam/
Entre no diretório:
# cd /usr/local/apache2/htdocs/lam
# ./configure
# make install
Agora vamos configurá-lo. Entre no diretório /usr/local/apache2/htdocs/lam/config e copie os arquivos config.cfg.example e lam.conf.example:
# cp config.cfg.example config.cfg
# cp lam.conf.example lam.conf
Agora vamos editar os arquivos config.cfg e lam.conf.
Deixe seu config.cf exatamente assim:
Agora vamos instalar o Ldap Account Manager. Primeiro crie o usuário e o grupo httpd:
# useradd httpd
# groupadd httpd
Depois pegue o pacote ldap-account-manager-1.0.2.tar.gz e o mova para:
# mv ldap-account-manager-1.0.2.tar.gz /usr/local/apache2/htdocs
Descompacte-o:
# tar -zxvf ldap-account-manager-1.0.2.tar.gz
Renomeie-o:
# mv ldap-account-manager-1.0.2 lam/
Entre no diretório:
# cd /usr/local/apache2/htdocs/lam
# ./configure
# make install
Agora vamos configurá-lo. Entre no diretório /usr/local/apache2/htdocs/lam/config e copie os arquivos config.cfg.example e lam.conf.example:
# cp config.cfg.example config.cfg
# cp lam.conf.example lam.conf
Agora vamos editar os arquivos config.cfg e lam.conf.
Deixe seu config.cf exatamente assim:
password to add/delete/rename configuration profiles
password: system
# default profile, without ".conf"
default: lam
password: system
# default profile, without ".conf"
default: lam
E o lam.config:
# LDAP Account Manager configuration
# server address (e.g. ldap://localhost:389 or ldaps://localhost:636)
serverURL: ldap://localhost:389
# list of users who are allowed to use LDAP Account Manager
# names have to be seperated by semicolons
# e.g. admins: cn=admin,dc=yourdomain,dc=org;cn=root,dc=yourdomain,dc=org
admins: cn=administrador,dc=tropical,dc=local
# password to change these preferences via webfrontend
passwd: system
# suffix of tree view
# e.g. dc=yourdomain,dc=org
treesuffix: dc=tropical,dc=local
usersuffix: ou=Usuarios,dc=tropical,dc=local
groupsuffix: ou=Grupos,dc=tropical,dc=local
hostsuffix: ou=Computadores,dc=tropical,dc=local
domainsuffix: ou=Dominios,dc=tropical,dc=local
# maximum number of rows to show in user/group/host lists
maxlistentries: 30
# default language (a line from config/language)
defaultLanguage: en_GB.utf8:UTF-8:English (Great Britain)
# Path to external Script
scriptPath:
# Server of external Script
scriptServer:
# Number of minutes LAM caches LDAP searches.
cachetimeout: 5
samba3: yes
# Module settings
modules: posixAccount_minUID: 10000
modules: posixAccount_maxUID: 30000
modules: posixAccount_minMachine: 50000
modules: posixAccount_maxMachine: 60000
modules: posixGroup_minGID: 10000
modules: posixGroup_maxGID: 20000
modules: posixGroup_pwdHash: CRYPT
modules: posixAccount_pwdHash: CRYPT
# List of active account types.
activeTypes: user,group,host,smbDomain
types: suffix_user: ou=Usuarios,dc=tropical,dc=local
types: attr_user: #uid;#givenName;#sn;#uidNumber;#gidNumber
types: modules_user: inetOrgPerson,posixAccount,shadowAccount,sambaSamAccount
types: suffix_group: ou=Grupos,dc=tropical,dc=local
types: attr_group: #cn;#gidNumber;#memberUID;#description
types: modules_group: posixGroup,sambaGroupMapping
types: suffix_host: ou=Computadores,dc=tropical,dc=local
types: attr_host: #cn;#description;#uidNumber;#gidNumber
types: modules_host: account,posixAccount,sambaSamAccount
types: suffix_smbDomain: ou=Dominios,dc=tropical,dc=local
types: attr_smbDomain: sambaDomainName:Domain name;sambaSID:Domain SID
types: modules_smbDomain: sambaDomain
# server address (e.g. ldap://localhost:389 or ldaps://localhost:636)
serverURL: ldap://localhost:389
# list of users who are allowed to use LDAP Account Manager
# names have to be seperated by semicolons
# e.g. admins: cn=admin,dc=yourdomain,dc=org;cn=root,dc=yourdomain,dc=org
admins: cn=administrador,dc=tropical,dc=local
# password to change these preferences via webfrontend
passwd: system
# suffix of tree view
# e.g. dc=yourdomain,dc=org
treesuffix: dc=tropical,dc=local
usersuffix: ou=Usuarios,dc=tropical,dc=local
groupsuffix: ou=Grupos,dc=tropical,dc=local
hostsuffix: ou=Computadores,dc=tropical,dc=local
domainsuffix: ou=Dominios,dc=tropical,dc=local
# maximum number of rows to show in user/group/host lists
maxlistentries: 30
# default language (a line from config/language)
defaultLanguage: en_GB.utf8:UTF-8:English (Great Britain)
# Path to external Script
scriptPath:
# Server of external Script
scriptServer:
# Number of minutes LAM caches LDAP searches.
cachetimeout: 5
samba3: yes
# Module settings
modules: posixAccount_minUID: 10000
modules: posixAccount_maxUID: 30000
modules: posixAccount_minMachine: 50000
modules: posixAccount_maxMachine: 60000
modules: posixGroup_minGID: 10000
modules: posixGroup_maxGID: 20000
modules: posixGroup_pwdHash: CRYPT
modules: posixAccount_pwdHash: CRYPT
# List of active account types.
activeTypes: user,group,host,smbDomain
types: suffix_user: ou=Usuarios,dc=tropical,dc=local
types: attr_user: #uid;#givenName;#sn;#uidNumber;#gidNumber
types: modules_user: inetOrgPerson,posixAccount,shadowAccount,sambaSamAccount
types: suffix_group: ou=Grupos,dc=tropical,dc=local
types: attr_group: #cn;#gidNumber;#memberUID;#description
types: modules_group: posixGroup,sambaGroupMapping
types: suffix_host: ou=Computadores,dc=tropical,dc=local
types: attr_host: #cn;#description;#uidNumber;#gidNumber
types: modules_host: account,posixAccount,sambaSamAccount
types: suffix_smbDomain: ou=Dominios,dc=tropical,dc=local
types: attr_smbDomain: sambaDomainName:Domain name;sambaSID:Domain SID
types: modules_smbDomain: sambaDomain
Realmente você faz a diferença aqui no VOL ao postar um tuto como estes e se tratando de um assunto como LDAP.
Sinceramente thelinux.