Se supone que el archivo smbldap-tools-0.8.4.tgz se encuentra en el directorio /tmp. Los pasos para instalar los scripts que provee smbldap-tools son:
Descompresión del archivo smbldap-tools-0.8.4.tgz:
Ejemplo J.1. Descompresión del archivo smbldap-tools-0.8.4.tgz
Se descomprime el archivo con los scripts en el directorio temporal:
Ejemplo J.3. Copiando los scripts a /usr/local/sbin/
Se copian los scripts al directorio /usr/local/sbin/
# /bin/cp -v --remove-destination /tmp/smbldap-tools-0.8.4/smbldap-* \ /tmp/smbldap-tools-0.8.4/smbldap*.pm /usr/local/sbin/ `smbldap-groupadd' -> `/usr/local/sbin/smbldap-groupadd' `smbldap-groupdel' -> `/usr/local/sbin/smbldap-groupdel' `smbldap-groupmod' -> `/usr/local/sbin/smbldap-groupmod' `smbldap-groupshow' -> `/usr/local/sbin/smbldap-groupshow' `smbldap-migrate-accounts' -> `/usr/local/sbin/smbldap-migrate-accounts' `smbldap-migrate-groups' -> `/usr/local/sbin/smbldap-migrate-groups' `smbldap-passwd' -> `/usr/local/sbin/smbldap-passwd' `smbldap-populate' -> `/usr/local/sbin/smbldap-populate' `smbldap-useradd' -> `/usr/local/sbin/smbldap-useradd' `smbldap-userdel' -> `/usr/local/sbin/smbldap-userdel' `smbldap-usermod' -> `/usr/local/sbin/smbldap-usermod' `smbldap-usershow' -> `/usr/local/sbin/smbldap-usershow' `smbldap_tools.pm' -> `/usr/local/sbin/smbldap_tools.pm |
Ejemplo J.4. Copiando los archivos de configuración a su lugar de destino
Se han de copiar los archivos de configuración de smbldap-tools al directorio /etc/smbldap-tools/:
# /bin/mkdir -vm 755 /etc/smbldap-tools/ mkdir: se ha creado el directorio `/etc/smbldap-tools/' # /bin/cp -v /tmp/smbldap-tools-0.8.4/smbldap*conf /etc/smbldap-tools/ `/tmp/smbldap-tools-0.8.4/smbldap_bind.conf' -> `/etc/smbldap-tools/smbldap_bind.conf' `/tmp/smbldap-tools-0.8.4/smbldap.conf' -> `/etc/smbldap-tools/smbldap.conf' # /bin/chmod -v 600 /etc/smbldap-tools/* el modo de `/etc/smbldap-tools/smbldap_bind.conf' cambia a 0600 (rw-------) el modo de `/etc/smbldap-tools/smbldap.conf' cambia a 0600 (rw-------) |
Ejemplo J.5. Configuración de smbldap-tools
Se hace uso del script configure.pl para realizar la configuración de smbldap-tools:
Se recomienda haber realizado la configuración de Samba antes de proceder con este paso. Vea el Capítulo 9, Configuración de Samba para más información sobre como configurar Samba.
# cd /tmp/smbldap-tools-0.8.4/ ./configure.pl -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- smbldap-tools script configuration -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Before starting, check . if your samba controller is up and running. . if the domain SID is defined (you can get it with the 'net getlocalsid') . you can leave the configuration using the Crtl-c key combination . empty value can be set with the "." caracter -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Looking for configuration files... Samba Config File Location [/etc/samba/smb.conf] > [ENTER] smbldap Config file Location (global parameters) [/etc/smbldap-tools/smbldap.conf] > [ENTER] smbldap Config file Location (bind parameters) [/etc/smbldap-tools/smbldap_bind.conf] > [ENTER] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Let's start configuring the smbldap-tools scripts ... . workgroup name: name of the domain Samba act as a PDC workgroup name [GSRDOMAIN] > [ENTER] . netbios name: netbios name of the samba controler netbios name [TODOSCSI] > [ENTER] . logon script: may be startup.cmd, ... or "" to set it to username.cmd logon script [] > [ENTER] . logon drive: local path to which the home directory will be connected \ (for NT Workstations). Ex: 'H:' logon drive [H:] > [ENTER] . logon home: home directory location (for Win95/98 or NT Workstation). \ Ex: '\\TODOSCSI\home' logon home (leave blank if you don't want homeDirectory) [\\%L\%u\.profile] > \\TODOSCSI\ . logon path: home directory where roaming profiles are stored. Ex: '\\TODOSCSI\profiles\' logon path (leave blank if you don't want roaming profile) \ [\\%L\profiles\%u] > \\TODOSCSI\profiles\ . ldap suffix [dc=gsr,dc=pt] > [ENTER] . ldap group suffix [ou=groups] > [ENTER] . ldap user suffix [ou=people] > [ENTER] . ldap machine suffix [ou=machines] > [ENTER] . ldap master server: IP adress or DNS name of the master (writable) ldap server ldap master server [] > gsr.pt . ldap master port [389] > [ENTER] . ldap master bind dn [cn=admin,dc=gsr,dc=pt] > [ENTER] . ldap master bind password [] > [clave] . ldap slave server: IP adress or DNS name of the slave ldap server: can also be the master one ldap slave server [] > gsr.pt . ldap master port [389] > [ENTER] . ldap master bind dn [cn=admin,dc=gsr,dc=pt] > [ENTER] . ldap master bind password [] > [clave] . ldap tls support (1/0) [0] > [ENTER] . SID for domain GSRDOMAIN: SID of the domain (can be obtained with 'net getlocalsid TODOSCSI') SID for domain GSRDOMAIN [S-1-5-21-3777331929-1837441497-3139219028] > [ENTER] . unix password encryption: encryption used for unix passwords unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA) [SSHA] > MD5 . default user gidNumber [513] > 10001 . default computer gidNumber [553] > 10001 . home directory prefix (without username) [/home/] > /home/samba/users/ . default password validation: default time before a user has to change his password default password validation time (time in days) [45] > 0 . default login shell [/bin/bash] > [ENTER] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= backup old configuration files: /etc/smbldap-tools/smbldap.conf->/etc/smbldap-tools/smbldap.conf.old /etc/smbldap-tools/smbldap_bind.conf->/etc/smbldap-tools/smbldap_bind.conf.old writing new configuration file: /etc/smbldap-tools/smbldap.conf done. /etc/smbldap-tools/smbldap_bind.conf done. |
Si no se ha hecho, establecer la clave del administrador de LDAP en el archivo secrets.tdb. Vea el Ejemplo 10.1, “Especificando la clave del administrador de LDAP en Samba” para saber como se hace.