J.2. Instalación

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:

  1. 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:

    $ /bin/tar xzvf /tmp/smbldap-tools-0.8.4.tgz -C /tmp/
    smbldap-tools-0.8.4/
    smbldap-tools-0.8.4/CONTRIBUTORS
    smbldap-tools-0.8.4/COPYING
    smbldap-tools-0.8.4/ChangeLog
    smbldap-tools-0.8.4/FILES
    smbldap-tools-0.8.4/INSTALL
    smbldap-tools-0.8.4/README
    smbldap-tools-0.8.4/TODO
    smbldap-tools-0.8.4/INFRA
    smbldap-tools-0.8.4/mkntpwd.tar.gz
    smbldap-tools-0.8.4/smbldap-groupshow
    smbldap-tools-0.8.4/smbldap-populate
    smbldap-tools-0.8.4/smbldap-useradd
    smbldap-tools-0.8.4/smbldap-groupadd
    smbldap-tools-0.8.4/smbldap-migrate-accounts
    smbldap-tools-0.8.4/smbldap-userdel
    smbldap-tools-0.8.4/smbldap-groupdel
    smbldap-tools-0.8.4/smbldap-migrate-groups
    smbldap-tools-0.8.4/smbldap-usermod
    smbldap-tools-0.8.4/smbldap-groupmod
    smbldap-tools-0.8.4/smbldap-passwd
    smbldap-tools-0.8.4/smbldap-usershow
    smbldap-tools-0.8.4/smbldap_tools.pm
    smbldap-tools-0.8.4/smbldap_bind.conf 1
    smbldap-tools-0.8.4/smbldap.conf 2
    smbldap-tools-0.8.4/smb.conf
    smbldap-tools-0.8.4/configure.pl 3
    smbldap-tools-0.8.4/doc/
    smbldap-tools-0.8.4/doc/smbldap-tools-annexes.tex
    smbldap-tools-0.8.4/doc/smbldap-tools-anx.tex
    smbldap-tools-0.8.4/doc/smbldap-tools-config.tex
    smbldap-tools-0.8.4/doc/smbldap-tools-faq.tex
    smbldap-tools-0.8.4/doc/smbldap-tools-install.tex
    smbldap-tools-0.8.4/doc/smbldap-tools-intro.tex
    smbldap-tools-0.8.4/doc/smbldap-tools-samba.tex
    smbldap-tools-0.8.4/doc/smbldap-tools-scripts.tex
    smbldap-tools-0.8.4/doc/smbldap-tools-secure.tex
    smbldap-tools-0.8.4/doc/smbldap-tools.tex
    smbldap-tools-0.8.4/doc/smbldap-tools-thx.tex
    smbldap-tools-0.8.4/doc/smbldap-tools-user.tex
    smbldap-tools-0.8.4/doc/smbldap-tools.pdf
    smbldap-tools-0.8.4/doc/html/
    smbldap-tools-0.8.4/doc/html/smbldap-tools.html
    smbldap-tools-0.8.4/doc/html/index.html
    smbldap-tools-0.8.4/doc/html/smbldap-tools001.html
    smbldap-tools-0.8.4/doc/html/smbldap-tools002.html
    smbldap-tools-0.8.4/doc/html/smbldap-tools003.html
    smbldap-tools-0.8.4/doc/html/smbldap-tools004.html
    smbldap-tools-0.8.4/doc/html/smbldap-tools005.html
    smbldap-tools-0.8.4/doc/html/smbldap-tools006.html
    smbldap-tools-0.8.4/doc/html/smbldap-tools007.html
    smbldap-tools-0.8.4/doc/html/smbldap-tools008.html
    smbldap-tools-0.8.4/doc/html/smbldap-tools009.html
    smbldap-tools-0.8.4/doc/html/smbldap-tools011.html
    smbldap-tools-0.8.4/doc/html/smbldap-tools010.html
    smbldap-tools-0.8.4/doc/html/previous_motif.gif
    smbldap-tools-0.8.4/doc/html/next_motif.gif
    smbldap-tools-0.8.4/doc/html/contents_motif.gif
    smbldap-tools-0.8.4/doc/README
    1 2

    Archivos de configuración de smbldap-tools, estos se han de copiar al directorio /etc/smbldap-tools una vez configurados.

    3

    Script de configuración.

  2. Ejemplo J.2. Cambio de permisos

    Se cambia el propietario y el grupo de los scripts por root.root:

    # /bin/chown root.root -R /tmp/smbldap-tools-0.8.4/
  3. 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
  4. 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-------)
  5. 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.
  6. 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.