Home
TOMO 2 - Repositorio CISC
Contents
1. catch NamingException e error Fallo al eliminar entrada url getDN e return false return true public boolean deleteTree LDAPURL url Cancelable cancelable ProgressListener listener DirContext ctx connect url if ctx null return false String entryDN null LDAPURL myurl null String baseDN url getDN try for NamingEnumeration results search ctx baseDN objectclass DEFAULT ATTR 1 false results hasMore if cancelable null amp amp cancelable isCanceled results close return false SearchResult si SearchResult results next entryDN getFixedDN si getName baseDN myurl new LDAPURL url getHost url getPort entryDN if deleteTree myurl cancelable listener results close return false 76 catch NamingException e error Fallo al eliminar rbol e return false if listener null listener msg entryDN null return deleteEntry url public boolean disconnect DirContext ctx null for Enumeration enume connections elements enume hasMoreElements try ctx DirContext enume nextElement ctx close catch NamingException e error fallo desconexion e connections clear return true public void error String msg Exception e String detail if e null
2. Plantill s Docentes creada y agregada Gr fico 42 Tipos de entradas Plantillas creada Agregrar un atributo Seleccione la entrada a la cual desea agregarle el atributo hacemos clic en men Editar la opci n Agregar atributo o clic derecho Administrador Agregar Atributo y se presenta la siguiente pantalla Gr fico 43 161 Servicio de Directorio LDAP ldaps 192 168 3 1 dc uguil dc com Archivo Editar Yer LDIF Ayuda DAM BIBADI 84 Atributos Valor ou vicerrectorado objectClass top Agregar Atributo Nombre del Atributo Tipo String Binary Gr fico 43 Agregar Atributo Debemos seleccionar el tipo de atributo si es string soporta caracteres o binario soporta solo n meros colocamos el nombre del atributo que deseamos agregar tal y cual lo soporta el servidor de directorio por eso esta acci n la debe realizar el administrador 162 Error Log En esta opci n que ofrece el men Ver se muestran los mensajes de error que el servidor genera cuando existe un fallo en las operaciones que la aplicaci n realiza sobre l Gr fico 44 Servicio de Directorio LDAP ldaps 192 168 3 1 dc uguil dc com rchivo Editar Ver LDIF Ayuda DD GMBAR ADA 88 J desuquil de com CA Jou rectorado dt ou vicerrectorai Je osorganizacion Error Log 09 39 28 AM Fallo al agregar nueva entraeda ou ne Reason ou newDocentes u rector
3. Referenced classes of package lbe editor PasswordHandler public class PasswordEditor extends JPanel implements AttributeEditor ActionListener pk Ref private static final long serialVersionUID 2877713845034403490L public PasswordEditor value null editMode false nobuttons false forceAlgorithm false defaultAlgorithm SHA 1 debugMode false setLayout new FlowLayout 0 2 2 public void actionPerformed ActionEvent e String cmd e getActionCommand if cmd equals Guardar como saveOption else if cmd eguals Insertar desde loadOption else if cmd eguals Verificar verifyOption else if cmd eguals Encriptar setOption 103 public boolean checkType Object value return value instanceof byte private File getFile JFileChooser filechooser new JFileChooser filechooser setCurrentDirectory new File if filechooser showOpenDialog this 0 File f filechooser getSelectedFile return f else return null private Frame getFrame if frame null frame new JFrame return frame public Object getValue if editMode String vl pwdTF getText return vl getBytes else return value public boolean isEmpty return value null value length 0 public boolean isRequired return false private v
4. detail null else detail e getMessage if listener null listener error msg detail public boolean exists LDAPURL url DirContext ctx connect url if ctx null return false try NamingEnumeration results search ctx url getDN objectclass DEFAULT ATTR 0 false return true catch NameNotFoundException return false catch NamingException return false public boolean export LDAPURL url 77 _ex _ex String filter ributes exporter String att Exportable Di if rContext ctx ctx null return false String entryDN String baseDN boolean moreRe while moreRefe try null ferrals rrals DAPURL myurl SearchResult for Na search ctx baseDN filter results hasMore xporter si getAttributes if cancel int scope mingEnumeration results attributes Cancelable cancelabl LA connect url F url getDN true si scope false xport myurl able isCanceled results close return false si entryDN baseDN myurl url getPort entryDN moreReferrals catch ReferralExc LDAPURL myurl int subscope boolean rs SearchResult results next getFixedDN si getName new LDAPURL url getHost false eption e getReferralUrl e scope 1 scope export
5. 44 public void reconnect disconnect autoconnect public void renameEntry TreeNode2 node LDAPURL url RenameEntryWindow w new RenameEntryWindow ldap url tree node UITools center frame w w setVisible true public void resetCursor container setCursor normCursor public void resetMenus boolean manager menuManager resetMenus manager if keyStroke null keyStroke KeyStroke getKeyStroke 127 0 if manager tree registerKeyboardAction this Eliminar Entrada keyStroke 1 table registerKeyboardAction this Eliminar Atributo keyStroke 1 else table unregisterKeyboardAction keyStroke tree unregisterKeyboardAction keyStroke public void saveConfiguration if propertiesMask amp 8 0 return filechooser getFileChooser filechooser setCurrentDirectory new File filechooser setApproveButtonText Guardar filechooser setDialogTitle Guardar configuracion if filechooser showOpenDialog this 0 return Fil file filechooser getSelectedFile String fname file getAbsolutePath if fname endsWith cfg fname fname cfg file new File fname 45 if Config save file setFeedback Configuracion grabada else setError Fallo al grabar archivo de configuracion public void selectUrl LDAPURL url tree selec
6. catch Exception e Debug error Error en AttriuteConfig e getMessage public static String defaultConfig attributes config private Hashtable attrProp private boolean changed EditWindow java package lbe ui ke k import java awt import java awt event ActionEvent import java awt event ActionListener import javax naming directory Attributes import javax swing import lbe common Referencia clases del package lbe ui EditPanel ViewPanel2 public class EditWindow extends JDialog implements ActionListener 52 public EditWindow JFrame frame AttributeConfig attrProp super frame Editar true newAttribs null this frame frame getContentPane setLayout new Borderlayout JPanel pl new JPanel applyButton new JButton Aplicar applyButton addActionListener this CancelButton new JButton Cancelar cancelButton addActionListener this pl add applyButton pl add cancelButton editPanel new EditPanel frame attrProp T getContentPane add initMenuBar North getContentPane add editPanel Center getContentPane add pl South public void actionPerformed ActionEvent e 53 String cmd e getActionCommand if cmd eguals Eliminar valor editPanel deleteSelectedValue else if cmd equals A adir Atributo editPanel addNewAttribute
7. else if cmd equals A adir Valor editPanel addValueToSelected else if cmd eguals Aplicar newAttribs editPanel getChanges setVisible false else if cmd equals Cancelar newAttribs null setVisible false else if cmd eguals addnoneempty editPanel addNoneEmptyOnly addNoneEmptyAttribCB isSelected public Attributes getChanges return newAttribs public void init LDAPURL url Attributes attrs int mode editPanel init url attrs mode pack String label mode 1 Actualizar Agregar addNoneEmptyAttribCB setText label non empty attributes only addNoneEmptyAttribCB setSelected true editPanel addNoneEmptyOnly addNoneEmptyAttribCB isSelected int height 0 Dimension sbSize editPanel getScrollBarSize if sbSize null height sbSize height Common fixSize this Dimension newSize getSize newSize height height setSize newSize UITools center frame this setVisible true 54 private JMenuBar initMenuBar JMenuBar mb new JMenuBar JMenu file new JMenu Archivo file add newMenuItem Aplicar A null file add newMenuItem Cancelar C null mb add file JMenu edit new JMenu Editar edit add newMenultem A adir Valor A null edit add newMenuItem Eliminar valor E nu
8. Grabar config Ctrl S Salir Gr fico 31 Opciones de Men Archivo 150 Opci n Editar Permite agregar eliminar atributos y entradas o editarlos si ya est n creados Tambi n puedes copiar una entrada o moverla a otra rama del rbol Gr fico 32 Agregar Atributo Eliminar Attributo Editar Atributo Agregar Entrada Editar Entrada Ctrl E objectClass domain Eliminar Entra Renombrar Entrada Copiar Entrada Mover Entrada Crear Plantilla Gr fico 32 Opciones de Men Editar Opci n Ver Permite ver las caracter sticas de las entradas o atributos seleccionados Tambi n permite buscar un DN refrescar una entrada ordenar la visualizaci n del rbol o de la tabla en modo ascendente o descendente Gr fico 33 Servicio de Directorio LDAP Idaps 192 168 3 1 dc Archivo Editar LDIF Ayuda dy 2 Ver Entrada Ctrl V Ver Atributo A J desuquil dei tos Valor Sy o Edu Fig Buscar uquil ou se Encontrar DN llass top o del Oredenar Arbol b lass domain ou gr Ordenar Tabla o Econon El CJ o Filosofi Refrescar ou jurispr Desplegar error log Gr fico 33 Opciones de Men Ver 151 Opci n LDIF La entrada LDIF permite importar o exportar un fichero LDIF Gr fico 34 Servicio de Directorio LDAP ldaps 1 Archivo Editar Ver Enis Ayuda de 2 Exportar pw mere E Pa Pd Puan Gr fico
9. catch MalformedURLException e Debug error Invalido url getMessage EU data Thread t new Thread new FinishDragThread event false SwingUtilities invokeLater t return boolean move false if data charAt 0 c move event getDropAction 2 int rc TransferTreeWindow verify super parent frame super parent ldap srcUrl destUrl if rc 1 rc 2 Thread t new Thread new FinishDragThread event false SwingUtilities invokeLater t return else TransferTreeWindow w new TransferTreeWindow super parent ldap srcUrl destUrl move UITools center super parent frame w w addActionCompletedListener new ActionCompletedListener public void canceled Thread t new Thread new FinishDragThread event false SwingUtilities invokeLater t public void completed boolean success 66 if success expand node Thread t new Thread new FinishDragThread event success SwingUtilities invokeLater t 7 w setVisible true return private DragSource dragSource private TreeNode2 sourceNode LdapURL java 67 permite la conexion con el servidor package lbe common import java ne import java ne CF CT public class L public LDA PU host dn bas DA alformedURLException URLDecoder PURL RL port null 389 public LDAPURL String ur
10. msg append ssl ldaps ldap msg append host if ssl amp amp port 636 ssl amp amp port 389 msg append msg append String valueOf port msg append msg append dn return msg toString private String host private int port private String dn private String base 71 JNDI java package lbe ldap import java util import javax naming import javax naming directory import javax swing tree DefaultMutableTreeNode import lbe common import lbe interfaces public class JNDI public JNDI connections new Hashtable connector null limit 0 timeout 0 version 2 anonymousBind true indicatorType 0 indicatorAttr null listAttrs null listFilter null attributesList null parser null showOpAttributes false listener null env new Properties env put java naming factory initial DEFAULT CTX public boolean addAttribute LDAPURL url Attribute at try ModificationItem mods new ModificationItem 1 mods O new ModificationItem l at return modifyAttribute url mods catch NamingException e error Fallo al agregar at getID atributo por url getUrl e return false T public boolean addEntry LDAPURL url Attributes at DirContext ctx connect url if ctx null return false try ctx createSubcontext
11. resetConnection url catch NamingException e error Fallo al leer entrada url getDN return null return attrs public boolean renameEntry LDAPURL url String newDN DirContext ctx connect url if ctx null return false try 84 ctx rename url getDN newDN catch ReferralException e error Fallo al renonbrar entrada no soportado por referrals e return false catch NamingException e error Fallo al renombrar entrada url getDN e return false return true private void resetConnection LDAPURL url connections remove url getBase private NamingEnumeration search DirContext ctx String dn String filter String attribs int type throws NamingException return search ctx dn filter attribs type true private NamingEnumeration search DirContext ctx String dn String filter String attribs int type boolean setLimits throws NamingException SearchControls constraints new SearchControls constraints setSearchScope type constraints setReturningAttributes attribs if setLimits constraints setCountLimit limit constraints setTimeLimit timeout NamingEnumeration results ctx search dn filter constraints return results public Vector search LDAPURL url String filter String attribs boolean subTreeScope Cancelable canc
12. Tr 61 public void treeExpanded TreeExpansionEvent event Nod TreeNode2 tmp 2 event getPath getLastPathComponent TreeNode2 t TreeNode2 tmp getFirstChild if t isUpdated expand tmp public void updateParentNode TreeNode2 node nableListeners false tree clearSelection TreeNode2 pr TreeNode2 node getParent expand pr nableListeners true public void valueChanged TreeSelectionEvent e TreeNode2 tmp TreeNode2 e getPath getLastPathComponent parent read tmp getURL private int sortOption protected JTree tree private TreeNode2 root protected Browser parent protected DefaultTreeModel treeModel 62 DnDDirTree java package lbe ui import java awt Point import java awt datatransfer import java awt dnd import java net MalformedURLException import javax swing import javax swing tree TreePath import lbe common import lbe interfaces ActionCompletedListener import lbe util FinishDragThread Referencia clases del of package lbe ui DirTree Browser TransferTreeWindow public class DnDDirTree extends DirTree implements DragGestureListener DropTargetListener DragSourceListener public DnDDirTree Browser p super p dragSource null dragSource DragSource getDefaultDragSource DragGestureRecognizer dgr dragSource
13. public String getBase if base null base ldap host port return base public String getDN return dn public String getEncodedUrl return getBase encode dn public String getHost return host public int getPort 69 return port public String getUrl return getBase dn private static char hexChar int hexValue if hexValue lt O hexValue gt 15 return x if hexValue lt 10 return char hexValue 48 else return char hexValu 10 97 private void parseHostPort String str throws MalformedURLException int pl str indexOf if pl sl host str port 389 else host str substring 0 pl String pp str substring pl 1 try port Integer parselnt pp catch NumberFormatException _ex throw new MalformedURLException Invalid port number pp public boolean sameHosts LDAPURL url return getHost equalsIgnoreCase url getHost amp amp getPort url getPort public void setDN String dn this dn dn 70 public void setHost String host this host host base null public void setPort int port this port port base null public static String toUrl String host int port String dn boolean ssl StringBuffer msg new StringBuffer
14. putClientProperty JTree lineStyle 0 ollPane scrollPane new JScrollPane llPane setPreferredSize new Dimension 200 lPane getViewport add tree setLayout new GridLayout 1 0 add tree public void addNode LDAPURL url scrollPane setRootVisible false TreePath path tree getSelectionPath TreeNode2 selected getSelectedNode path TreeNode2 first null if selected isUpdated String name parent getName url getDN first new TreeNode2 name url first add new TreeNode2 nothing here selected add first treeModel reload selected TreePath p path pathByAddingChild first tree setSelectionPath p tree scrollPathToVisible p else 56 expand selected selectNode url public void addTreeMouseListener MouseAdapter e tree addMouseListener e public void clear nableListeners false root removeAllChildren treeModel reload root tree setRootVisible false tree clearSelection public void createTree LDAPURL url root setUrl url String rootName url getDN if rootName length 0 rootName Root DSE root setUserObject rootName tree setRootVisible true parent list root sort root treeModel reload root nableListeners true public void deleteNode TreeNode2 node tree removeTreeSelectionListener this treeModel removeNo
15. return null Attributes temp new BasicAttributes true for int i 0 i lt size i temp put currAttrib get attributes i return temp public void init LADEN Ys 40 public void init String dir if connectWindow null connectWindow new ConnectWindow2 frame dir ldap if Config autoconnect autoconnect else if propertiesMask amp 2 0 openConnectWindow private void initClipboard SecurityManager s System getSecurityManager if s null try s checkSystemClipboardAccess clipboard Toolkit getDefaultToolkit getSystemClipboard catch SecurityException _ex System err println Unable to access system clipboard Internal clipboard will be used instead clipboard new Clipboard myclipboard else clipboard Toolkit getDefaultToolkit getSystemClipboard public void list TreeNode2 node busy Retrieving if ldap list node node getURL int nentries node getChildCount if nentries 0 done Listo No retorna entradas else if nentries 1 done Listo Retorna una entrada else done Listo nentries entradas retornadas public void lostOwnership Clipboard clipboard Transferable tr 41 clipboardOwner false public void openConnectWindow connectWindow setProperties Config getSettings UITools
16. tex cert null cert getNotAfter toString N A vadilityTLB setText text text cert null cert getSerialNumber toString N A serialnLB setText text TE Dd P public void setReguired boolean flag public void setValue Object new_value 101 if new_value null else va va sizeLB lue new byte 0 lue byte new_value setText Common format value false X509Certificate cert getCertObject setFields cert public boolean verify return true private private private private private private private private private abel subjectLB abel issuerLB abel versionLB abel algorithmLB abel vadilityFLB abel vadilityTLB abel serialnLB EE Cy Ei EY E Ey Cy E Panel buttonP abel sizeLB protected JButton saver protected JButton loadF protected JButton viewB protected byte value private String cmdstr 102 PasswordEditor java package lbe editor import java awt import java awt event ActionEvent import java awt event ActionListener import java io File import java io PrintStream import java util Hashtable import javax swing import javax swing text JTextComponent import lbe common Common import lbe common UITools import lbe interfaces AttributeEditor
17. 1 Solicitar acceso 2 Revisar Acceso 3 Llenar formulario 4 Enviar solicitud de acceso 5 An lisis de solicitud 6 Creaci n de acceso al Sistema 7 Enviar respuesta al Cliente 8 Acepta acceso conociendo privilegios 9 Realizar operaciones 10 Digita datos de objetos 11 Verificar datos 12 Almacenar datos de forma segura 13 Digita datos de objeto a buscar 14 Buscar datos de objetos de forma segura 15 Visualizar datos de objetos 16 Modifica datos de objetos 17 Eliminar Objetos del Servidor 18 Continuar Operaciones 10 1 2 3 2 Definici n de condiciones de activaci n N CONDICIONES DE ACTIVACI N 1 Si reguiere acceso Si no existe dominio Usuario Grupo y o Solicitud Rechazada 3 Si existe formulario 4 Envio de solicitud existente 5 An lisis de solicitud aceptada 6 Si existe en el Servidor Si objeto dominio organizaci n grupo usuario 7 pertenece al Servidor y tiene privilegios y o Continua Operaci n 8 Operaci n realizar Ingreso 9 Si datos digitados 10 Datos digitados correctamente 11 Operaci n a realizar Otra 12 Se escribe datos a buscar 13 Si encuentran datos objetos para Consulta 14 Si encuentran datos objetos para Actualizaci n 15 Si encuentran datos objetos para Eliminaci n 16 Si desea continuar No desea continuar 11 1 2 3 3 Resumen Eventos Condiciones y Operaciones EV
18. 34 Opciones de Men LDIF Si se exporta un archivo LDIF se puede elegir entre exportar s lo la entrada seleccionada s lo la entrada con sus hijos intermedios o la entrada con todos los hijos Si se importa tendremos las opciones de solo a adir solo actualizar o a adir y actualizar Gr fico 435 Exportar LDIF Importar LDIF Archivo LDIF Archivo LDIF Export Importar metodo 3 Seleccionar entrada Solo a adir O Hijos intermedios O Solo actualizar O Todos los hijos O A adirfActualizar Gr fico 35 Exportar e Importar LDIF Ingresar Entrada Despu s de revisar toda la visualizaci n del directorio LDAP continuaremos con la opci n a adir entradas en el 152 directorio LDAP Nuestra aplicaci n permitir crear entradas de organizaciones facultades administraci n rectorado etc unidades organizacionales departamentos de cada organizaci n personas docentes personal administrativo y de servicios alumnos y organizaciones de personas anonimos administradores Se accede a la opci n Agregar Entrada del men Editar luego procedemos a elegir el tipo de entrada los cuales se encuentran en un fichero templates definiendo el tipo de entrada seg n la selecci n que realiz Organization Person Organizaci n Persona OrganizationalPerson OrganizationalUnit Unidad Organizativa Crear Nueva organization Entrada Archivo Editar dn objectclass objectclass
19. CN uquil com OU servidor O sds L guayaquil ST quayas C ec Valido desde Sun Apr 01 09 44 16 CEST 2007 Valido hasta Tue Mar 31 09 44 16 CEST 2009 Gr fico 29 Certificado Autofirmado Visualizaci n del rbol de directorio Una vez conectado el usuario por medio de la aplicaci n con el servidor podemos observar la jerarqu a del rbol del Servidor LDAP sus entradas en forma visual siendo de esta manera m s amigable que la visualizaci n que ofrece directamente el servidor En el lado izquierdo de la ventana podemos apreciar la estructura del rbol y a la derecha visualizamos los atributos y valores correspondiente al nodo del rbol Adem s 149 Servicio de Directorio LDAP ldaps 192 168 3 1 dc uguil dc com Archivo Editar Ver LDIF Ayuda R 204 Ba ADE 8 gt y de uquil de com Atributos Valor J J o Edu Fisica gt d ou secretaria o decanato objectClass domain veg ousgraduacion __ o Economia o Filosofia ou jurisprudencia Listo No retorna entradas Gr fico 30 Visualizaci n del Arbol de Directorio En el men podemos ver diferentes opciones desplegables que a continuaci n explicaremos Opci n Archivo Esta opci n nos permite conectarnos desconectarnos reconectar y grabar configuraci n Gr fico 31 Servicio de Directorio LDAP Ida aa Editar Ver LDIF Ayuda conectar HC 1 8 A o Desconectar 1 conectar Abrir config
20. Fallo en transferencia de arbol return false return true public boolean updateAttribute LDAPURL url Attribute at try ModificationItem mods new ModificationItem 1 mods 0 new ModificationItem 2 at return modifyAttribute url mods catch NamingException e error Fallo al actualizar at getID atributo por url getUrl e return false ot public boolean updateEntry LDAPURL url Attributes at DirContext ctx connect url if ctx null return false try ctx modifyAttributes url getDN 2 at catch ReferralException e LDAPURL myurl getReferralUrl e return updateEntry myurl at catch NamingException e error Fallo al actualizar entrada url getDN e return false return true public boolean updateEntry LDAPURL url Attributes ats boolean replace return replace synchEntry url ats addEntry url ats private static final String DEFAULT ATTR objectclass y private static final String DEFAULT_LIST_FILTER objectclass public static final String LDAP_VERSION java naming ldap version private static final String LDAP ALIAS OPTION java naming ldap derefAliases private static final String LDAP DELETE RDN java naming ldap deleteRDN private static final String LDAP BINARY ATTRIBUTES java naming ldap attribu
21. Nuevo Modificar Eliminar Reiriciar RAID LVM la Eidos Formateo Inicio Fi Grafico 11 Configuraci n de la Partici n C mo identifico la unidad donde voy a instalar Linux Cuando vemos un disco duro o unidades dentro de Windows se presentan como letras del abecedario C D E etc pero dentro de Linux es diferente ya que su estructura semeja un rbol donde cada partici n y dispositivo de lectura escritura se representa como un directorio los nombres de las unidades de disco duro son 119 hda disco duro principal hdb disco duro secundario hda1 primera partici n del disco duro principal hdb2 segunda partici n del disco secundario Ahora para dar un ejemplo de todo este proceso supongamos que tienen un disco duro de 20 GB y generan dos particiones uno de 5 GB para Windows y el resto para Linux entonces es hda1 Windows y hda2 Linux siendo en este ltimo donde crear amos las particiones del sistema Directorios de Linux Estos directorios se crean en el momento de la instalaci n del sistema boot Donde se leen los par metros para iniciar el sistema Requiere al menos 75 MB en Red Hat Enterprise Linux 3 0 y White Box Enterprise Linux 3 0 Asignar m s espacio puede considerarse desperdicio 120 o ra z Es donde se instalar n los componentes del sistema operativo Reguiere de 350 a 512 MB Swap Espacio f sico para la memoria vi
22. System exit 1 file args i else if args i egualsIgnoreCase base if i 1 gt args length System err println base requiere un argumento System exit l base args 1 boolean rs false if base null rs Config setBaseLocation file System getProperty user dir File separator else rs Config setBaseLocation base if rs System err println No se puede colocar base en ese lugar Tiene que termina con o System exit 1 23 if file null Config loadConfig Config defaultConfFile else Config loadConfig file String lookAndFeel com sun java swing plaf windows WindowsLookA ndFeel try UIManager setLookAndFeel lookAndFeel catch Exception ex System err println Fallo carga L amp F lookAndFeel System err println ex System exit 1 Window splash new Window new Frame JFrame frame new JFrame Servicio de Directorio LDAP frame setForeground Color black JOptionPane setRootFrame frame JPanel pp new JPanel public Insets getInsets return new Insets 10 15 10 15 y BrowserApp app new BrowserApp JLabel head new JLabel Servicio de Directorio LDAP head setForeground Color black head setAlignmentX 0 5F pp setBorder new BevelBorder 0 pp setLayout new BorderLayout pp add head North pp add app getProgressLabel C
23. administrador de este Configurar contrase a O liege 3 la conmasena de root tad ministradon de est de root Contrase a de root Use la cuenta root solo para Contirmar prop sitos de administraci n Una Contrase a de root aceptada vez que la instalaci n se haya completado cree una cuenta no root para su uso general y su para ganar acceso root cuando requiera reparar algo r pidamente Estas reglas b sicas minimizar n los riesgos de un error tipogr fico o de un comando incorrecto da ando su sistema Notas de ltima hora lt Q Antenor Siguiente g Esconder Ayuda Gr fico 16 Configuraci n Contrase a del Root Al terminar haga clic sobre el bot n Siguiente y espere a que el sistema haga la lectura de informaci n de los grupos de paquetes 126 Selecci n de paguetes En la siguiente pantalla podr seleccionar los grupos de paquetes que quiera instalar en el sistema A ada o elimine a su conveniencia Gr fico 17 mg Ayuda en linea selecci n de grupos de paquetes 2 Selecci n de grupos EEE de paquetes 7 Sistema X Window 31 33 Detalles EX Instalar este grupo de paquetes para usar la interfaz de Una vez que un grupo de Gar usuario X gr fica L paguetes ha sido seleccionado Z Entorno de escritorio de GNOME 135 351 Detalles pulse Detalles para ver qu we GNOME es una interfaz gr fica de usuario potente que paquetes ser n instalados por E incluye
24. conexi n con el servidor LDAP por defecto encontramos browser cfg la cual puede ser modificada Cuando se crean nuevas sesiones se generan estos archivos de configuraci n BrowserApp lbe ui Clase principal mediante la cual se realiza la activaci n de las clases gue desarrollan los componentes del rbol de directorio menu principal y archivos de configuraci n utilizando las clases MenuManager java Crea la interfaz principa menu tool bar pop up DisplayHelpAction java Crea las ayudas DnDDirTree java lama a los componentes del rbol se extiende de la clase DirTree java Browser Ibe ui Ubica los objetos de acuerdo a la posici n Define tama o y dimensiones de la tabla y rbol en donde visualizaremos las entradas atributos y valores Permitiendo mediante la funci n init levantar la ventana de conexi n Adem s asigna las funciones correspondientes a cada uno de los tems del men 20 AttributeConfig Ibe common Realiza el proceso de ingresos de los valores o atributos que no se encuentren definidos en la plantilla seleccionada y que se requieran a adir Trabajando conjuntamente con la clase EditWindow java que es donde se crea la ventana que contendr las opciones de a adir atributos y valores adem s permite el cambio de atributos DirTree Ibe ui Permite la expanci n y selecci n del rbol ordenar entradas obtener el puerto y el host para posteriormente conec
25. eg section servidor Common Name eg your name or your server s hostname u guil com Email Address elweka hotmail com Gr fico 24 Creaci n de certificado 142 El certificado solo ser v lido cuando el servidor LDAP sea invocado con el nombre definido en el campo Comon Name Es decir solo podr utilizarlo cuando se defina uquil com como servidor LDAP con soporte SSL TLS Es necesario que todos los ficheros de claves y certificados tengan permisos de acceso de solo lectura para el usuario Idap chown ldap ldap etc openldap cacerts slapd chmod 400 etc openidap cacerts slapd Par metros slapd conf Se debe descomentar los parametros TLSCACertificate TLSCertificateFile y TLSCertificateKeyFile estableciendo las rutas hacia el certificado y clave Editar el archivo slapd conf que se encuentra en la ruta etc openldap y hacer las siguientes modificaciones TLSCACertificateFile etc openldap cacerts slapd crt TLSCertificateFile etc openldap cacerts slapd crt TLSCertificateKeyFile etc openldap cacerts slapd key 143 Es necesario reiniciar el servicio ldap para que hagan efectos los cambios realizados service ldap restart 2 7 Breve resumen de la funcionalidad de la aplicaci n Servicio de Direcorio LDAP El Servicio de Directorio LDAP proporciona un interfaz de uso f cil Permite que los usuarios vean un rbol de directorio LDAP de una manera jer rquica As como tambi
26. loadF new JButton Insertar desde saveF addActionListener this loadF addActionListener this verifyP new JButton Verificar verifyP addActionListener this generateP new JButton Encriptar generateP addActionListener this public void setEditMode boolean edit if edit pwdTF new JTextField 20 add pwdTF if nobuttons add add add add verifyP generateP saveF loadF else pwdLabel new JLabel add pwdLabel 106 if nobuttons add verifyP add saver editMode edit private void setOption JButton setB new JButton Encriptar JButton cancelB new JButton Cancelar JLabel msgL new JLabel final JPasswordField passTF new JPasswordField 20 JPanel pl new JPanel pl add new JLabel Ingresar contrase a pl add passTF JPanel buttonP new JPanel buttonP add setB buttonP add cancelB JPanel main new JPanel main setLayout new BorderLayout main add pl North main add buttonP South msgL setForeground Color black final JDialog frame new JDialog getFrame Generar Contrase a true frame getContentPane add main cancelB addActionListener new ActionListener public void actionPerformed ActionEvent e frame dispose DN ActionListener actionListener null setB addActionListener actionListener new ActionL
27. 1 Definici n de Generalizaci n 1 1 3 Diagrama de Relaciones de Objetos ORGANIZACION EDUCATIVAS ACADEMICOS Esta en ADMINISTRATIVAS d ADMINISTRATIVOS RECTORADO Y VICFRRFCTORANN DEPARTAMENTOS Esta en ZIN USUARIOS GRUPOS DOCENTE Accesado SERVIDOR SEGURO PERSONAL Pertenec ADM Y SERV e ALUMNOS Gr fico 2 Relaci n de Objetos 1 2 An lisis del Comportamiento de Objetos ACO 1 2 1 Estado de Objetos y cambio de los mismos DOMINIO Nula En espera Denegado Creado Activado Desactivado Modificado Eliminado ORGANIZACION Nula Solicitado En espera Denegado Educativas Rectorado y Vicerrectorado a Administrat Activado Desactivado Modificado Eliminado DEPARTAMENTOS Nula Solicitado AA En espera Denegado Acad micos Administrativos Activado Desactivado Modificado Eliminado USUARIOS Nula Solicitado En espera Denegado E Docente Personal Adm y Sev a Alumnos Activado Desactivado Modificado Eliminado GRUPOS Nula Solicitado En espera Denegado Comun EE Administrador Activado Desactivado Modificado Eliminado S D S Nula Creado Solicitud Inst En espera Denegado Instalada Usada Desinstalada a o o SERVIDOR SEGURO Nula Creado Solicitud Inst En espera Denegado Instalada Usada Desinstalada PF Gr fico 3 Estados de Objetos 1 2 2 Defin
28. Gr fico 28 147 Conectar al Servidor Lista de Sesiones Conexi n R pida i Host Opciones Informaci n del Host Host 192 168 3 1 Puerto 636 SSL Anonimo Base DN dc uauil dc com v Informaci n Usuario Usuario DN cn root a adido base DN Contrase a Conectar Cancelar Gr fico 28 Conectar con el Servidor Pesta a Conexi n R pida Si es un usuario Administrador este podr realizar las operaciones de ingreso modificaci n eliminaci n b squedas de entradas del rbol de directorio Si es un usuario an nimo este solo podr realizar operaciones de b squedas y deber activar la casilla An nimo Adem s el usuario podr conectarse mediante un puerto seguro 636 eligiendo la opci n SSL caso contrario se conectar por defecto mediante el puerto 389 Si nos conectamos de manera segura por el puerto 636 nos aparecer una ventana en la que debemos aprobar un certificado autofirmado que esta creado en el servidor 148 Certificado Autofirmado En esta ventana el usuario tendr tres opciones Aceptar el certificado en esta sesi n aceptarlo siempre y no aceptarlo En caso de elegir la tercera opci n la aplicaci n no podr conectarse en modo seguro y nos mandar un error en la conexi n Gr fico 29 Necesitando certificado CA en el Servidor Estas seguro de confiar en el certificado que se encuentra en el servidor Asunto EMAILADDRESS pao_pao122 hotmail com
29. OpenLdap Se procede ahora a editar el fichero slapd conf este es el archivo principal de OpenLDAP y es aqu donde se configuran todos sus par metros este fichero se encuentra dentro del directorio etc openldap Par metros Globales Los par metros dentro de esta secci n afectan el funcionamiento de todo el Servidor OpenLDAP cualquier definici n antes de un par metro database es considerado global Se verifica que los ficheros de esquema m nimos requeridos est n presentes include Este par metro indica otros archivos de configuraci n utilizados por el Servidor OpenLDAP la declaraci n anterior carga los archivos core schema cosine schema _ inetorgperson schema _ nis schema Estos par metros no ser n modificados de tal modo debe guedar algo as 131 See slapd conf 5 for details on configuration options This file should NOT be world readable include include include include etc openldap schema core schema etc openldap schema cosine schema etc openldap schema inetorgperson schema etc openldap schema nis schema referral Opcionalmente se puede descomentar la directiva referral para indicar el URI Identificador Uniforme de Recursos del servicio de directorio superior como Idaps en lugar de Idap referral ldaps uguil com pidfile Contiene el n mero de proceso asignado al servidor LDAP al arranque argsfile Contiene par metros utilizados en la linea de
30. at getSelected2 table getSelectedAttributes if at null return 200 Resourc 29 if ldap anonymousBind view frame node getURL at else edit frame node getURL at 1 if progress null progress setProcess 6 int height Resource getResourceAsInt height int tableWidth Resourc getResourceAsInt table width 250 int treeWidth height height table getResourceAsInt tree width 250 Dimension tableSize new Dimension tableWidth Dimension treeSize new Dimension treeWidth table setPreferredSize tableSize tree setPreferredSize treeSize table setMinimumSize tableSize tree setMinimumSize treeSize JPanel pl new JPanel pl setLayout new BorderLayout pl add status new JTextField 30 Center status setEditable false JSplitPane sp new JSplitPane l false tree sp setOneTouchExpandable true add mb North JPanel top new JPanel top setLayout new BorderLayout top add menuManager getToolBar North top add sp Center add top Center add pl South status setText Creado por U G CISC 3SG04 setConnectionButtons true resetMenus false history new HistoryWindow Error Log 350 200 Config getLogSize UITools center frame history status addMouseListener new MouseAdapter public void mouseClicked MouseEvent e if e getClickCo
31. cb setSelectedItem names lastElement comp 0 Ingresar o seleccionar el nombre de la plantilla 36 comp 1 cb int rs JOptionPane showOptionDialog frame Object comp Crear Plantilla 2 3 null null null if rs 0 return String name String cb getSelectedItem name name trim if name length 0 setError Error Crear Plantilla Nombre de plantilla no es valida return if templates checkTemplateName name setError Error Crear Plantilla plantillas name ya existe return if templates addTemplate name names prefix entry JMenuItem mu adds add new JMenuItem name mu addActionListener menuManager getAction Plantillas T setFeedback Plantillas name creada y agregada else setError Error al crear nueva plantilla MAR T private void cutAttributes LDAPURL url String attributes Object values for int i 0 i lt attributes length i Attribute at new BasicAttribute attributes i values i ldap deleteAttribute url at read url public void deleteAttribute LDAPURL url String attributes Object values JCheckBox cbl new JCheckBox Todos los valores 37 JCheckBox cb2 new JCheckBox Seleccionar valor cb2 setSelected true JPanel pl new JPanel pl setLayout new GridL
32. class Browser extends JPanel implements ActionListener ClipboardOwner private static final long serialVersionUID public Browser this null public Browser StartupListener progress inFrame clipboard clipboardOwner clipboardCut sourceNode null null false false null 1L JFrame menuManager null keyStroke null ldap null templates null aConfig null currAttrib null tree null table null history null viewWindow null editWindow null connectWindow null container null frame null propertiesMask 0 rd null frame inFrame setLayout new BorderLayout if progress null progress setProcess l initClipboard aConfig new AttributeConfig 27 Common fixSize Config getFixLocation if Debug debugMode Config printSettings aConfig print ldap new JNDI ldap setConnectionHandler new ReferralHandler frame ldap addErrorListener new ErrorListener public void error String msg String detail setError msg detail 7 if progress null progress setProcess 2 menuManager new MenuManager this DisplayHelpAction helpAction new DisplayHelpAction inFrame menuManager registerAction usage he menuManager registerAction general helpAction menuManager registerAction notes hel lpAction lpAction menuManager r
33. comandos al iniciar el servidor OpenLDAP pidfile argsfile var run slapd pid var run slapd args access Par metro utilizado para restringir acceso al servidor LDAP access to by dn cn root dc uquil dc com write by read 132 Parametros por Base de Datos Dentro de cada servidor LDAP se pueden encontrar varias base de datos es dentro de estas bases de datos gue residir toda informaci n del Servidor OpenLDAP En el sentido m s estricto de la palabra OpenLDAP no utiliza una base de datos la base de datos utilizada en OpenLDAP es generalmente Idbm database Indica el tipo de base de datos a utilizarse generalmente del tipo Idom Otras alternativas shell passwd suffix Este par metro indica el nodo ra z de la base de datos esto es el nodo sobre el cual ser derivada toda la informaci n en este caso dc uquil dc com Lo anterior indica que toda informaci n dentro de esta base de datos LDAP descender de la jerarqu a de uguil dc com 133 rootdn Establece el nodo usuario que tiene privilegios globales para modificar la base de datos LDAP en este caso cnzroot n tese que desciende del nodo ra z suffix dc uquil dc com BEER ldbm and or bdb database definitions BAE database ldbm suffix dczuguil dc com rootdn cn root dc ruguil dc com rootpw Indica la contrase a para el usuario rootdn Esta contrase a tambi n puede ser encriptada root
34. fin de establecer hacia que servidor y a que directorio 136 conectarse Para fines pr cticos estos par metros se modifican en etc openldap ldap conf HOST 192 168 3 1 BASE dc uquil dc com TLS_CACERTDIR etc openldap cacerts Authconfig modo texto Se habilitan las casillas utilizar LDAP y utilizar autenticaci n LDAP Gr fico 19 pulse la tecla Tab hasta Siguiente y pulse la tecla Enter y verifique que los datos del servidor y el directorio a utilizar sean los correctos Gr fico 20 authconfig 4 6 12 c 1999 2005 Red Hat Inc Configuraci n de la autenticaci n Informaci n del usuario Autenticaci n A Informaci n de la cach Utilizar Hesiod Utilizar NIS Utilizar Kerberos Utilizar Winbind Utilizar Autenticaci n SMB Utilizar Autenticaci n Winbind La autorizaci n local es suficiente Cancelar Siguiente Grafico 19 Authconfig Pantalla Principal 137 authconfig 4 6 12 c 1999 2005 Red Hat Inc Configuraci n de LDAP B Utilizar TLS Servidor DN base Gr fico 20 Authconfig Configuraci n LDAP Authconfig gtk modo gr fico Utilizando authconfig gtk se deben habilitar las casillas de Soporte LDAP Antes de cerrar la ventana en la pesta as de Informaci n del usuario y Autenticaci n Gr fico 21 Antes de dar clic en Aceptar hacer clic en Configurar LDAP y verificar que los datos del servidor y el directorio a utilizar sean los corr
35. getName name index for int i 0 i lt tmp getChildCount i TreeNode2 t TreeNode2 tmp getChildAt i url t getURL crNode parent parseDN url getDN if crNode null continue crName getName crNode crNode size 1 Debug debug revisando crName selName if crName egualsIgnoreCase selName continue TreePath pa path pathByAddingChild t if index 1 name size tree setSelectionPath pa tree scrollPathToVisible pa else if tree isCollapsed pa tree expandPath pa selectNode pa name index 1 break 60 public void selectNode LDAPURL url selectDN url getDN public void selectParent TreeNode2 node TreeNode2 parent node getParentNode if parent null javax swing tree TreeNode nodes parent getPath TreePath path new TreePath nodes tree setSelectionPath path tree scrollPathToVisible path public void setSortOption int sortType sortOption sortType private void sort TreeNode2 node switch sortOption case 1 N001 node sort false break case 2 002 node sort true break public void sort boolean ascending TreeNode2 node getSelected if node null return else node sort ascending true treeModel reload node return public void treeCollapsed TreeExpansionEvent treeexpansionevent
36. meds PS 2 Rat n de rueda USB Raton PS 2 de 2 botones Rat n PS 2 de 3 botones Raton serial de 2 botones Rat n serial de 3 botones al dev trys COML baja DOS jdevityS M2 bajo DOS jdevrrys COMJ bajo DOS jdev ttyS3 COM4 baja DOS f j C Emular 3 botones Gr fico 9 Configuraci n del Rat n Tipo de instalaci n Existen cuatro tipos de instalaciones Escritorio personal Estaci n de trabajo Servidor Personalizada 117 Escogemos la opci n Servidor Pulsamos Siguiente Grafico 10 ED os Ayuda en linea Tipo de Instalaci n Escritorio personal Meal para estaciones de trabajo o portaties seleccione este upo de Nsialaci n para instalar un entomo de ascrtorlo gr fico y crear un sistema deal para el uso del directorio principal o del escrtono Tipo de Instalaci n Seleccione el tipo de instalaci n que mejor se ajusta a sus necesidades Estaci n de trabajo Esta opci n instala un entorno de escritorio gr fico con herramientas para el desarrollo del software y la administraci n del sistema O gt u Una instalacion destruira cualquier informaci n guardada previamente en las particiones Servidor seleccionadas Seleccione este tipo de instalaci n si desea contigurar la condivision O de ficheros y de b impresora asi como los servicios de Web Se habitar n tamb n los servicios adicionales y puede escoger sideses Para m s inf
37. n permite hacer inserciones eliminaciones y modificaciones siempre y cuando el usuario sea administrador Los objetos de LDAP se exhiben bajo la forma de rbol y todos los atributos de las entradas bajo la forma de tabla El estado actual de la aplicaci n se observa en la barra de estado En esta barra se muestran mensajes al seleccionar una entrada a adirla modificarla o borrarla Los mensajes de estado son de color negro las advertencias en amarillo y mensajes de error en rojo 144 2 8 Aplicaci n Servicio de Directorio LDAP paso a paso Para ejecutar la aplicaci n SDS Servicio de Directorio seguro se debe dar doble clic en el archivo ejecutable browser jar gue se encuentra en la carpeta gue se proporciona en el cd posteriormente observaremos una pantalla de carga de la aplicaci n Gr fico 25 Servicio de Directorio LDAP inicializando A NR Gr fico 25 Cargando la aplicaci n Una vez que la aplicaci n est inicializada se presenta la pantalla de conexi n en la cual se captura par metros de comunicaci n de la aplicaci n con el servidor de directorio LDAP definiendo una sesi n Conexi n con el Servidor Se observa dos pestanas Lista de sesiones y Cconexi n r pida Lista de Sesiones Aqu el usuario tiene la oportunidad de crear editar copiar borrar y renombrar sesiones 145 colocando en su sesi n los datos necesarios para la conexi n con el servidor de di
38. 001 msg Configuracion break case 2 002 msg menus break case 3 N003 msg componentes del arbol break case 4 004 msg cargando templates break case 5 005 msg componentes de tabla break case 6 006 msg inicializando break default msg Inicializado break setMessage msg private int currentProgressValue private JLabel progressLabel private JProgressBar progressBar Browser java package lbe ui 26 import java awt import java awt datatransfer import java awt event import java io File import java io PrintStream import java util import javax naming Name import javax naming directory import javax swing import javax swing Timer import javax swing text JTextComponent import javax swing tree DefaultMutableTreeNode import lbe common import lbe interfaces import lbe ldap JNDI import lbe ui connect ConnectWindow2 import lbe util Referencia a clases del package lbe ui AboutWindow AddAttributeWindow AttributeTable CustomFileFilter DeleteEntryWindow DirTree DisplayHelpAction DnDAttributeTable DnDDirTree EditPanel EditWindow HistoryWindow JR LDIFExportWindow LDIFImportWindow PasteDNWindow ReadThread ReferralHandler RenameEntryNindov SearchWindow TemplateAction TransferTreeWindow ViewWindow2 public
39. Algorithm String defaultAlgorithm boolean debugMode CAP TULO 2 MANUAL DE USUARIO 2 1Recomendaciones Generales Se recomienda leer por completo esta gu a en la que se detallan algunas especificaciones con respecto al Sistema Servicio de Directorio LDAP Si se requiere m s informaci n acerca del funcionamiento rem tase al manual aqu proporcionado 2 2 Elementos de Hardware Para poder utilizar el sistema de Servicio de Directorio Seguro requerimos Un Servidor Terminal o terminales en red 111 Descripciones detalladas del Servidor Procesador Debe ser multiprocesador Disco Duro Para utilizar OpenLDAP lo m s optimo es que utilice un disco duro para el sistema operativo y otro para el directorio donde se guarde la base Memoria El tamano de la memoria depende de las entradas que almacenaremos y los atributos que estas contengan como m nimo podemos tener 768 MB Descripciones detalladas del Terminal es Procesador Lo m s recomendable es un Petium IV Disco Duro Desde 40GB Memoria El tama o de la memoria recomendable para el Terminal que contendr la aplicaci n Servicio de Directorio LDAP que interact a con el servidor 112 2 3 Elementos de Software Los requisitos de software que se emplean en el proyecto son los siguientes En el servidor Sistema Operativo Linux Fedora Core 4 OpenLdap 2 2 23 5 OpenSSL 0 97f 7 Parches necesarios
40. Base DirContext ctx DirContext connections get base if ctx null return ctx setDefaultEnv env put java naming provider url base do try ctx new InitialDirContext env connections put base ctx return ctx catch AuthenticationException e 74 error Error de autenticacion base if connector null return null Properties pr connector referralConnection env url anonymousBind if pr null env pr continue catch CommunicationException e error Error de comunicacion base e if connector null return null if connector connectionFailed url resetConnection url continue catch NamingException e error Fallo al conectarse a base e return ctx while true public boolean deleteAttribute LDAPURL url Attribute at try ModificationItem mods new ModificationItem 1 mods 0 new ModificationItem 3 at return modifyAttribute url mods catch NamingException e error Fallo al eliminar at getID atributo por url getUrl e return false public boolean deleteEntry LDAPURL url 75 DirContext ctx connect url if ctx null return false try ctx destroySubcontext url getDN catch ReferralException e LDAPURL myurl getReferralUrl e return deleteEntry myurl
41. CAP TULO 1 MANUAL TECNICO A continuaci n se presenta el funcionamiento del proyecto definici n de objetos generalizaciones diagrama de relaci n y generalizaci n de los objetos estado de los objetos y cambios en los mismos eventos estados pre estados post estados condiciones de activaci n diagrama de flujo de objetos etc Adem s tambi n ponemos a su disposici n el diccionario de datos codificaci n de los componentes m s relevantes y con su respectiva explicaci n El objetivo de este manual t cnico es dar a conocer la estructura y comportamiento de los objetos como el servidor la aplicaci n y dem s objetos que interact an en el proyecto 1 1 Analisis de la Estructura de Objetos AEO 1 1 1 Definici n de tipos de objetos En el proyecto encontramos los siguientes objetos DOMINIO ORGANIZACI N organization EDUCATIVAS ADMINISTRATIVAS RECTORADO Y VICERECTORADO DEPARTAMENTOS organization unit ACADEMICOS ADMINISTRATIVOS USUARIO person DOCENTES PERSONAL ADMINISTRATIVO Y DE SERVICIO ALUMNOS GRUPOS person unit ANONIMO ADMINISTRADOR S D S Aplicaci n Servidor de Directorio Seguro SERVIDOR SEGURO 1 1 2 Definici n de Generalizaciones ORGANIZACION EDUCATIVAS ADMINISTRATIVAS DEPARTAMENTOS ACAD MICOS RECTORADO Y ADMINISTRATIVOS VICERRECTORADO USUARIOS GRUPOS DOCENTE AN NIMO O COMUN ERONAT ADMINISTRADOR ADM Y SERV ALUMNOS Gr fico
42. ENTOS CONDICIONES DE ACTIVACION OPERACIONES Solicitar acceso Acceso por analizar Si requiere acceso Revisar Acceso Objeto no existente en Servidor Si no existe dominio Usuario Grupo y o Solicitud Rechazada Llenar formulario Formulario llenado Si existe formulario Enviar solicitud de acceso Solicitud Realizada Env o de solicitud existente Analisis de solicitud Acceso Creado Si se crea el Acceso Env a respuesta al cliente Solicitud en an lisis Analisis de solicitud aceptada Rechazada Creaci n de acceso al Sistema Cliente del Sistema Si existe en el Servidor Acepta acceso conociendo privilegios Cliente con Servicios Si objeto dominio organizaci n grupo usuario pertenece al Servidor y tiene privilegios y o Continua Operaci n Realizar operaciones 12 EVENTOS CONDICIONES DE ACTIVACION OPERACIONES No existe objeto Operaci n realizar Ingreso Digita datos de objetos Objeto digitado Si datos digitados Verificar datos Objeto correctamente Datos digitados correctamente Almacenar datos de forma segura digitado Cliente con permiso Operaci n a realizar Otra Digita datos de objeto a buscar Objeto digitado por buscar Se escribe datos a buscar Busca datos de objetos de forma segura Objeto activo Si encuentran datos objetos para Consulta Visualizar datos de objetos Obj
43. En el Terminal les Sistema Operativo Windows XP Parches necesarios 113 2 4 Elementos L gicos Los elementos l gicos que se requieren son Direcciones IP configuraci n de la red que se va a emplear Ej Red 192 168 3 0 24 Mascara 255 255 255 0 2 5 Instalaci n de Fedora Core 4 0 Antes de comenzar asegurarse de tener una partici n o un disco duro nuevo Aconsejamos que imprima esta gu a o por lo menos apunte los pasos m s importantes en un papel Arrancamos desde el CD Empezamos a instalar Presiona Enter para comenzar la instalaci n gr fica observar como se cargan algunos m dulos y como Linux reconoce el hardware 114 A continuaci n aparece una pantalla Gr fico 7 en la cual pregunta si desea analizar los CD para comprobar si funcionan correcto es recomendable que escanee los 3 CDs si no desea hacerlo seleccione Skip cuando termine la acci n seleccione Continue se cargar Anaconda que es instalador gr fico de Red Hat ahora ya puede usar el rat n haga clic en Next Gr fico 7 Verificaci n de discos Select lenguaje En la siguiente pantalla selecciona el idioma Spanish y vuelve a pulsar Next 115 Configuraci n del teclado Selecciona Spanish de la lista y pulsa en Siguiente Gr fico 8 Df Ayuda en linea Teclado Configuraci n del Ge Seleccione el teclado apropiado para el sistema teclado 7 Brasile o ABNT 2 Elija
44. Internet o est en una rod p blica amp a es recomendado que sea configurado un cortafuegos para ayudar a preverse accesos no autorizados Sin embargo usted ha seleccionado no configuras cortafuego configurad forma adecuada pued incrementar fa seguric un cortafuego o firewall Por favor seleccione Proceder para sistema continuar sin un cortafuegos Escoja el nivel adecui Configurar cortafuegos Eroceder 5 seguridad para su sist E n sistema Linux tradicional Se puede configurar en un estado Ning n cortafuegos inhabilitado en un estado que solamente le adviene sober lo que se Ning n cortafuegos provee died rechazar O A ii eto completamente activa acceso total a su sistema y no Mabiltar SELinux Activo wi realiza controles de seguridad Mediante controles de segundad se inhabilita el WEsconder Ayuda GNotas de ltima hora d Anteror D gt Siguiente Gr fico 12 Configuraci n del Cortafuegos Haga clic sobre el bot n Proceder a fin de saltar la configuraci n del cortafuegos 122 Configuraci n de red Para configurar los par metros de red del sistema haga clic sobre el bot n Modificar para la interfaz eth0 En la ventana emergente para modificar la interfaz eth0 desactive la casilla Configurar usando DHCP y especifique la direcci n IP y m scara de subred que utilizar en adelante el sistema Confirme con el administrador de la red donde se localice que estos datos sean corre
45. LDAPURL toUrl Attributes attributes Attribute at null int i 0 boolean failed false boolean res false JCheckBox cbl new JCheckBox Agregar Atributos JCheckBox cb2 new JCheckBox Reemplazar Atributos cb2 setSelected true Object msg new Object 3 msg 0 Pegar opciones msg 1 cbl msg 2 cb2 ButtonGroup p new ButtonGroup p add cbl 43 p add cb2 int rs JOptionPane showConfirmDialog this Object msg Pegar Atributos 2 if rs 0 return for Enumeration enume attributes getAll enume hasMoreElements at Attribute enume nextElement if cbl isSelected res ldap addAttribute toUrl at else res ldap updateAttribute toUrl at if res failed true read toUrl public void read LDAPURL url rd read url public void readConfiguration if propertiesMask amp 4 0 return filechooser getFileChooser filechooser setCurrentDirectory new File filechooser setApproveButtonText Abrir filechooser setDialogTitle Abrir configuracion if filechooser showOpenDialog this 0 return Fil file filechooser getSelectedFile if Config load file setFeedback Leer configuracion disconnect init else setError fallo al leer archivo de configuracion public void rebuildRootTree tree rebuildRoot
46. ado dc uquil Grafico 44 Error Log 163 Adicionalmente en el menu Ayuda encontramos las opciones de General Uso Notas y About La opci n General como su nombre hace referencia ofrece informaci n de las caracter sticas generales de la aplicaci n para que usuario tenga una noci n de la aplicaci n Gr fico 45 Ayuda Servicio de Directorio Seguro Caracter sticas Servicio de Directorio LDAP E Servicio de Directorio LDAP Idaps 1192 168 3 1 6c uquil de comy fu EIS Acho Edta Ver LDIF Ayuda B sicas 34285346 ADRES Navegaci n f cil Hojear buscar y corregir el DIT rbol jer rquico de entradas del directorio Edici n Ingreso modificaci n o elimicaci n de entradas atributos o valores Busqueda Consultas de nodos y sus atributos Los resultados se pueden ahorrar en un archivo LDIF Uso de Plantillas Las plantillas se utilizan para crear y agregar nuevas entradas Gr fico 45 Ayuda General 164 La opci n Uso presenta un peque o manual para guiar al usuario de la aplicaci n Gr fico 46 Servicio de Directorio Seguro ndice Servicio de Directorio LDAP Introducci n Conexi n Administraci n Consultas Gr fico 46 Ayuda Uso 165 La opci n Notas da una breve explicaci n de la importaci n y exportaci n de los archivos LDIF Gr fico 47 Servicio de Directorio Seguro General Browser Importaci n l Exp
47. ar certificados nos proporcione uno pero como normalmente el OpenLDAP lo vamos a usar en la red local no a trav s de internet ni para hacer comercio electr nico basta con que la generemos nosotros mismos Es decir vamos a generar un Certificado autofirmado Para generar el certificado desde l nea de comandos vamos a acceder a la ruta etc openldap cacerts y digitaremos lo siguiente Openssl reg x509 nodes newkey days 730 out slapd crt keyout slapd key 141 Lo anterior solicitar se ingresen varios datos C digo de dos letras para el pa s Estado o Provincia Ciudad Nombre de la empresa o raz n Social Unidad o secci n Nombre del anfitri n Direcci n de correo La salida de Vuelta ser a similar al siguiente gr fico Generating a 1024 bit RSA private key EE AE JA cicles HEET writing new private key to dovecot key You are about to be asked to enter information that will be incorporated into your certificate request what you are about to enter is what is called a Distinguished Name or a DN There are quite a few fields but you can leave some blank For some fields there will be a default value If you enter the field will be left blank Country Name 2 letter code GB EC State or Province Name full name Berkshire Guayas Locality Name eg city Newbury Guayaquil Organization Name eg company My Company Ltd sds Organizational Unit Name
48. at new BasicAttributes true at put new BasicAttribute name w getActualAttributeType if editWindow null editWindow new EditWindow frame aConfig editWindow setTitle Agregar Atributo url getDN editWindow init url at 2 Attributes newAt editWindow getChanges if newAt null return if type equals binary aConfig addAttribute name aConfig save ldap setAttributeConfig aConfig Attribute a newAt get name if ldap addAttribute url a read url 34 public void autoconnect tree setSortOption Config getTreeSortOption ldap init null ldap setAttributeConfig aConfig menuManager setOpAttributesCheckbox Config areAttributesS et if Config verifyHostInfo connectTo Config getHost Config getPort Config getBaseDN Config useSSL public void busy String msg setFeedback msg container setCursor waitCursor private void connectTo String host String port String baseDN boolean ssl int prt Common toInt port 389 String urlString LDAPURL toUrl host prt baseDN ssl LDAPURL url new LDAPURL host prt baseDN busy Conectando a urlString if ldap mainConnect url resetMenus ldap anonymousBind true setConnectionButtons false Ex createTr url setFeedback Conectado setTitle Servicio de Directorio LDAP urlstring mys private vo
49. ayout 2 1 pl add cbl pl add cb2 Object msg new Object 2 msg 1 pl ButtonGroup p new ButtonGroup p add cbl p add cb2 if attributes length 1 msg 0 Remover attributes 0 con atributo con atributos else msg 0 Remover attributes length ll gt int rs JOptionPane showConfirmDialog this Object msg Eliminar Atributo 0 if rs 0 return Attribute at null boolean failed false int i 0 busy Eliminando for i 0 i lt attributes length i if cbl isSelected at new BasicAttribute attributes i else at new BasicAttribute attributes i values i if ldap deleteAttribute url at failed true if failed rd synchRead url setWarning Errores encontrados durante la eliminacion Revisar el error log else read url public void disconnect ldap disconnect setConnectionButtons true resetMenus false tree clear 38 table clear menuManager setOpAttributesCheckbox false setTitle Servicio de Directorio LDAP setFeedback Desconectado public void done done Listo public void done String msg setFeedback msg container setCursor normCursor private LDAPURL url_tmp public void edit JFrame frame LDAPURL url final Attributes attribs final int mode url_tmp url if attribs
50. bemos refrescar el rbol desde el dn raiz 159 Crear Platillas Crea un archivo de formato templates el cual contiene los atributos de la entrada gue personalizamos Para llevar a cabo esta operaci n primero debemos seleccionar una entrada del directorio del cual deseamos copiar la plantila para personalizarla colocando el nombre que deseemos Gr fico 41 Servicio de Directorio LDAP Idaps 192 168 3 1 dc uquil dc co Archivo Editar Ver LDIF Ayuda RC VV Y WE E se de uguil de com Atributos Yalor ou rectorado ou vicerrectorado ay ou vicerrectorado objectClass top EC o organizacionadmin Crear Plantilla 9 Ingresar o seleccionar el nombre de la plantilla ke 2 Docentes v Gr fico 41 Crear Plantilla Para comprobar que la plantilla fue creada creamos una nueva entrada y al seleccionar el tipo de entrada observaremos el nombre de la plantilla que creamos Gr fico 42 160 Servicio de Directorio LDAP Idaps 192 168 3 1 dc uquil dc com DER Archivo BES Ver LDIF Ayuda Agregar Atributo y ab i lt Eliminar Attributo du Editar Atributo mM Atributos Valor eg Agregar Entrada J paola do yo Editar Entrada Ctrl E organization Eliminar Entra person Renombrar Entrada identificador Copiar Entrada organizationalUnit Mover Entrada organizationalPerson ationalUnit de la Universidad de Guayaquil Crear Plantilla Doce ntes
51. ble getSelectedAttributes if testSelectedAttributes at Attributes attr getSelected2 at if attr null edit frame url attr 2 else if cmd equals Crear Plantilla createTemplate url currAttrib else if cmd equals Copiar Entrada transferTreeUl url false else if cmd equals Mover Entrada transferTreeUl url true else if cmd equals Eliminar Atributo String attributes table getSelectedAttributes Object values table getSelectedValues if testSelectedAttributes attributes deleteAttribute url attributes values else if cmd eguals Ver Atributo String attributes table getSelectedAttributes if testSelectedAttributes attributes 3 Attributes at getSelected2 attributes if at null view frame url at else if cmd eguals Buscar SearchWindow w new SearchWindow this ldap url tree UITools center frame w w setVisible true else if cmd equals Copiar copy url false null else if cmd equals Cortar copy url true selectedNode else if cmd equals Pegar paste url selectedNode public void addAttribute LDAPURL url AddAttributeWindow w new AddAttributeWindow frame w setVisible true String name w getAttributeName String type w getAttributeType if name null return Attributes
52. buscan de determinada entrada Teniendo dos opciones de b squeda Un nivel Muestra en la parte inferior la ra z del nodo buscado 154 Sub niveles de rbol Muestra el nodo a buscar y los nodos del cual se deriva E Servicio de Directorin U NADA lidane 1 1902 AAR 3 4 Ide uauil dr raml aAA Archivo Editar Ver PNL a B DN o oraaniza gt Ay Q uscar en o Filtrar objectclass 35 __ de uquil de com gt ou rectorado gt ou vicerrectoradf B squeda en Un nivel Sub niveles del rbol Atributos o organizacionac o neworganizati dn o organizacionadmin de uquil de com ou secretaria o organizacionadmin de uquil de com cn mariaperez ou secretaria o organizacionadmin de uguil d en gloriasanchez ou secretaria o organizacionadmin dc uguil Coinciden 4 entradad Buscar Grafico 37 Ventana de Busgueda Editar Para realizar modificaciones a una entrada o atributo se procede a dar clic en la opci n Editar Editar Atributo o Entrada tambi n presionando clic el bot n editar 7 gue mostrar una interfaz que permitir la edici n de los nodos del rbol de directorio se podr modificar los valores de los atributos anteriormente ingresados Gr fico 38 155 Al presionar el bot n aplicar se observar los valores de los atributos modificados Editar cn sof a o Economia dc uguil Archivo Editar objectClass
53. businessCategory postOfficeBox streetAddress postalCode searchGuide facsimileTelephoneNumber userPassword preferredDeliveryMethod telephoneNumber physicalDeliveryOfficeName registeredAddress destinationIndicator st x121Address l postal ddress seeAlso description telexNumber internationaliSDNNumber teletexTerminalIdentifier o Filosofia de uguil de com top organization Cdla Universitaria 2345 GSyyFtUseQMFD4x8BkwZubwHs Verificar Poner Grabar como Insertar desde 2233508 Facultatd de la Llniversidad de Guayaguil 2345465 Aplicar Gr fico 36 Crear Nueva Entrada 153 Una vez seleccionado el tipo entrada gue se desea hacer se deber ingresar datos como nombre numero de tel fono descripci n fax en este caso la nueva entrada es la facultad de filosof a Gr fico 36 Despu s de presionar el bot n aplicar se observar el nodo ingresado con sus respectivos atributos y valores Consulta o Busgueda Si se desea realizar una busgueda se lo puede hacer presionando el bot n de buscar o haciendo clic la opci n Ver Buscar Aparecer una ventana en la gue se muestra autom ticamente la ra z DN dc uquil dc com del rbol Gr fico 37 En Filtrar se deber indicar el criterio de busgueda por ejemplo objectclass objectclass top objectclass person objectclass organization En atributos se indicar los valores o atributos que se
54. c 127 Una vez terminada la selecci n de paquetes haga clic sobre el bot n Siguiente a fin de iniciar el proceso Instalando Si iniciar de forma autom tica el proceso de formato de las particiones que haya creado para instalar el sistema operativo Listo para la instalaci n Atenci n Una vez que pulse el bot n Siguiente el programa de instalaci n comenzar a escribir el sistema operativo a su disco duro Este proceso no se puede revenir Si ha decidido no continuar con la instalaci n este es el ltimo momento en el que puede abortar el proceso de forma segura Para abonar esta actualizaci n pulse el bot n Reset de su m quina o la combinaci n de teclas Control Alt Supr y luego extraiga cualquier medio de instalaci n entre las pantallas de Pulse en Siguiente para empezar la instalaci n de Fedora Core 4 El registro completo de la instalaci n puede encontrarse en el archivo roof install Jog luego de reiniciar su sistema Podr encontrar un archivo kickstart con las opciones de instalaci n seleccionadas en el archivo roct anaconda ks cfg luego de reiniciar el sistema Escena ayuda CGtinea lt de tima heen A Amen Po Spiere Grafico 18 Instalaci n de Paguetes 128 Iniciar la instalaci n de los paquetes necesarios para el funcionamiento del sistema operativo Espere algunos minutos hasta que concluya el proceso Una vez final
55. c void init Config config public boolean list TreeNode2 node DirContext ctx connect url LDAPURL url 81 if ctx null return false String name null TreeNode2 t null LDAPURL myurl null String baseDN url getDN String entryDN null boolean moreReferrals true while moreReferrals try for NamingEnumeration results search ctx baseDN listFilter listAttrs 1 results hasMore node add t SearchResult si SearchResult results next name fixName si getName entryDN getDN name baseDN myurl new LDAPURL url getHost url getPort entryDN t new TreeNode2 name myurl checkLeaf t si getAttributes moreReferrals false catch ReferralException e myurl getReferralUrl e if myurl getDN length 0 myurl setDN baseDN name url getDN else name getName myurl getDN name name myurl getHost myurl getPort t new TreeNode2 name myurl checkLeaf t null node add t moreReferrals e skipReferral try ctx DirContext e getReferralContext catch NamingException ex catch NamingException e error Ballo Lista ee 82 return false return true public boolean mainConnect LDAPURL url setDefaultEnv String base url getBase env put java naming provider url base try DirCo
56. center frame connectWindow connectWindow setVisible true java util Properties props connectWindow getProperties if props null disconnect Config setSettings props autoconnect public Name parseDN String dn return ldap parse dn private void paste LDAPURL url TreeNode2 dstNode if clipboard null setError No permite acceso al sistema Ve return Transferable clipData clipboard getContents clipboard if clipData null WW yR setWarning No peg dato return CopyData dirData null try String s String clipData getTransferData DataFlavor stringFlavor dirData CopyManager fromString s catch Exception e eM ice setError Error 4 getMessage return if dirData null 42 setError Dato invalido return if dirData attributes null if tree isFocused boolean move false TreeNode2 srcNode null if clipboardOwner amp amp clipboardCut move true srcNode sourceNode transferTreeUl dirData url srcNode url dstNode move else String selectedAttrib table getSelectedAttribute if selectedAttrib null PasteDNWindow w new PasteDNWindow this ldap url dirData url selectedAttrib UITools center frame w w setVisible true else pasteAttribute url dirData attributes public void pasteAttribute
57. createDefaultDragGestureRecognizer super tree 3 this dgr setSourceActions dgr getSourceActions 8 5 DropTarget dropTarget new DropTarget super tree this public void dragDropEnd DragSourceDropEvent event if event getDropSuccess int action event getDropAction if action 2 amp amp Isuper parent ldap anonymousBind super tree removeTreeSelectionListener this super treeModel removeNodeFromParent sourceNode super tree addTreeSelectionListener this 63 public void dragEnter DragSourceDragEvent dragsourcedragevent public void dragEnter DropTargetDragEvent droptargetdragevent public void dragExit DragSourceEvent dragsourceevent public void dragExit DropTargetEvent droptargetevent public void dragGestureRecognized DragGestureEvent dragGestureEvent sourceNode null TreePath path super tree getSelectionPath if path null return TreeNode2 node TreeNode2 path getLastPathComponent String op null if super parent ldap anonymousBind amp amp dragGestureEvent getDragAction 2 op Wendt else op msn StringSelection selection new StringSelection op node getURL getUrl sourceNode node dragSource startDrag dragGestureEvent null selection this public void dragOver DragSourceDragEvent dragsourcedragevent public void dra
58. ctos antes de continuar Al terminar haga clic sobre el bot n Aceptar Gr fico 13 Dispositivos de red Configuraci n de la r d E IP M scara de ted _ Modficat Cualquier dispositivo de re que posta en el sistema TT detectado autom ticamente por el programa de instalac y aparecer en la lista de Dispositivos de red Configurar eth C Configurar usando DHCP Y Activar al inicio ej host domain com Para configurar el dispositi de red seleccione el DecdenlP 110 40 0 19 dispositivo y pulse en M scara de red 255 0 o 50 Modificar En la pantalla di Modificar la interfaz podr escoger tener informaci n R Cancelar P Aceptar IP y m scara de red DEER configurada por DHCP o puede introducido de forma manual Puede escoger tambi n que el dispositivo est activo en el momento del VRE c ender Ayuda T Notas de ltima hora lt Antena B Siguiente Gr fico 13 Configuraci n de Red 123 Asigne un nombre de anfitri n HOSTNAME para el sistema Al terminar haga clic sobre el bot n Siguiente Gr fico 14 Dispositivos de red Configuraci n de Activar al inicio Dispositivo P Mascara de red Modficar la red E Cualquier dispositivo de red que posea en el sistema ser detectado autom ticamente Nombre del Host por el programa de instalaci n y aparecer en la lista de Dispositivos de red Configurar el nombre del host manualmente c
59. d name charAt i return buf toString else return name private String getDN String rdn String base if rdn length 0 return base if base length O return rdn else return rdn base public LDAPURL getDestination LDAPURL fromUrl LDAPURL toUrl boolean rename if rename return toUrl else String newDN getName fromUrl getDN toUrl getDN return new LDAPURL toUrl getHost toUrl getPort newDN private String getFixedDN String rdn String base return getDN fixName rdn base public String getName String dn try Name nm return nm get nm size parser parse dn catch NamingException _ex return null public LDAPURL getReferralUrl Referral String url try return new LDAPURL url catch Exception ex Debug error Invalid url url gt return null public int importEntry LDAPURL url 80 1 toString Exception e String e getReferralInfo ex getMessage String dn Attributes entry int type boolean rs false LDAPURL myurl new LDAPURL url getHost url getPort dn if type 0 rs addEntry myurl entry else if type 1 rs updateEntry myurl entry else if type 2 rs synchEntry myurl entry else return 0 return rs 1 1 publi
60. deFromParent node tree addTreeSelectionListener this private void enableListeners boolean enable if enable tree addTreeExpansionListener this tree addTreeSelectionListener this else tree removeTreeExpansionListener this tree removeTreeSelectionListener this 57 public void expand TreeNode2 tmp tmp removeAllChildren parent list tmp sort tmp treeModel reload tmp private String getName Name name int index String nm name get index return nm trim public TreeNode2 getSelected TreePath path tree getSelectionPath if path null return null else return TreeNode2 path getLastPathComponent public LDAPURL getSelectedEntries TreePath path tree getSelectionPaths if path null return null LDAPURL urls new LDAPURL path length for int i 0 i lt path length i TreeNode2 tmp TreeNode2 path i getLastPathComponent urls i tmp getURL return urls private TreeNode2 getSelectedNode TreePath path return TreeNode2 path getLastPathComponent public TreeNode2 getSelectedNodes TreePath path tree getSelectionPaths if path null return null TreeNode2 nodes new TreeNode2 path length for int i 0 i lt path length i nodes i TreeNode2 path i getLastPathComponen
61. do continue String attrName index trim String attrType 1 trim editorName edito if part2 null index if index part2 1 editorName editorArgs else editorName index trim editorArgs part2 substring index 1 trim AttributePropertie AttributeProperties editorName editorArgs partl substring 0 partl substring index rArgs null indexOf 57 part2 null part2 substring 0 new false s prop if attrType startsWith bin prop setBinary true else 51 if attrType startsWith str prop setBinary false else Debug error Tipo de dato desconocido continue attrProp put attrName toLowerCase prop catch Exception e 1 Debug error Error e getMessage return attrProp public void save save defaultConfig public void save String file Enumeration k attrProp keys try PrintWriter d Common writeFile file for k hasMoreElements d println String name String k nextElement AttributeProperties prop AttributeProperties attrProp get name d print name if prop isBinary d print binary else d print string if prop getEditorName null d print prop getEditorName if prop getEditorArgs null drpfint Y N F prop getEditorArgs d close
62. e String args MessageFormat format cmdstr new Object tmpF getAbsolutePath viewcmd Common parseArgs args if viewcmd null System err println No view cmd specified return Process child try child Runtime getRuntime exec viewcma 98 catch IOException e System err println Error starting external viewer e getMessage e printStackTrace private X509Certificate getCertObject if value null return null try ByteArraylnputStream bais new ByteArraylnputStream value CertificateFactory cf CertificateFactory getInstance X 509 return X509Certificate cf generateCertificate bais catch Exception e System err println e return null private File getFile String label JFileChooser filechooser new JFileChooser filechooser setApproveButtonText label filechooser setCurrentDirectory new File if filechooser showOpenDialog this 0 File f filechooser getSelectedFile return else return null public Object getValue if value null value new byte 0 return value public boolean isEmpty return value null value length 0 99 public boolean isReguired return false private void loadOption File f getFile Insert if f null return else setVa
63. ean clipboardCut private TreeNode2 sourceNode private JTextField status private JMenu adds private MenuManager menuManager private KeyStroke keyStroke protected JNDI ldap protected Templates templates protected AttributeConfig aConfig private Attributes currAttrib protected DirTree tree protected AttributeTable table protected HistoryWindow history protected ViewWindow2 viewWindow protected EditWindow editWindow protected ConnectWindow2 connectWindow protected JFileChooser filechooser private Container container protected JFrame frame private int propertiesMask private ReadThread rd AttributeConfig package lbe common import java io import java util Enumeration import java util Hashtable Referencia clases del package lbe common AttributeProperties Common Debug public class AttributeConfig public AttributeConfig this defaultConfig public AttributeConfig String filename attrProp null changed false attrProp read filename public boolean addAttribute String name if attrProp null attrProp new Hashtable if attrProp get name null attrProp put name new AttributeProperties true changed true return true else 49 return false public String getBinaryList String attribs new String for Enumeration e attrProp keys e hasMoreElements String k
64. ectos Gr fico 22 Informaci n del usuario AM ns NES NIS as af Servicio de infomaci n de mars Se uss hatsbuaiemen en redes peque as y me danas Mabilitar el soporte MIS Configurar MS LOAP El Ligttewight Direc Access Protocol on an made estindar de busqueda de un desctorio que pueda sostener da toa arbenra nes en una rar gu a estmecturada LDAP se usa cada ves m s en redes peque as y grandes 138 Hesiod Hasie dd arm que un admirador de sistemas publique informaci n de uvuarto y de grupo en ONS mampsdo se usa en redes amplia Mabibtar el soporte Hesiad Cor gurar Howe Yinand Winbind permite que un viera n hie ra informacion sobre los usuarias y los autentibque u sande la Informa ci n almacenada en sn senador N TOOM u ADS Esto va isa en redes peque as y grandes Mabiitre sapane LDAP Configurar DAP Habilitar el aaporte de yymnbind Canfu Wet ind tura ci n del usuario de la cach Mecancetar aceptus Gr fico 21 Authconfig gtk Pesta a de Informaci n del Usuario Configuraci n de LDAP Utilizar TLS para encriptar conexiones DN de Base de b squeda de LDAP dc linuxparatodos dc net Servidor LDAP 192 168 1 1 MK Cancelar J Aceptar Gr fico 22 Authconfig gtk Configuraci n LDAP 2 6 4 Configuraci n de OpenLdap en modo seguro Hasta ahora lo que hemos hecho ha sido configurar un servidor OpenLDAP para que funcione por el puerto est ndar es decir el puer
65. eeNode2 srcNode LDAPURL destUrl TreeNode2 destNode final boolean move if destUrl null int rc TransferTreeWindow verify frame ldap srcUrl destUrl if rc 1 rc 2 return TransferTreeWindow w new TransferTreeWindow ldap srcUrl destUrl move UITools center frame w final LDAPURL dstUrl destUrl final TreeNode2 dstNode destNode final TreeNode2 soNode srcNode w addActionCompletedListener new ActionCompletedListener public void canceled 47 public void completed boolean success if dstUrl null tree rebuildRoot else tree rebuildNode dstNode if move amp amp soNode null tree updateParentNode soNode o w setVisible true public void transferTreeUI LDAPURL srcUrl boolean move transferTreeUI srcUrl null null null move public void update Attributes attrib Vector all int maxA int maxV LDAPURL currEntry currAttrib attrib table updateTable all maxA maxV currEntry public void view JFrame frame LDAPURL url Attributes attribs if attribs null attribs ldap read url if viewWindow null viewWindow new ViewWindow2 frame aConfig viewWindow init url attribs viewWindow setVisible true public static Cursor waitCursor new Cursor 3 public static Cursor normCursor new Cursor 0 private Clipboard clipboard private boolean clipboardOwner private bool
66. egisterAction about hel javax swing JMenuBar mb menuManager getMenuBar final JPopupMenu treePopup menuManager getTreePopupMenu lpAction 28 final JPopupMenu tablePopup menuManager getTablePopupMenuf if progress null progress setProcess 3 tree new DnDDirTree this tree addTreeMouseListener new MouseAdapter public void mouseClicked MouseEvent e if e getModifiers amp 8 O e getModifiers amp 4 0 amp amp tree isSelected treePopup show e getComponent e getX e getY 1 if progress null progress setProcess 4 templates new Templates TemplateAction templateAction new TemplateAction this menuManager registerAction Plantillas templateAction String tt templates listOfTemplates adds menuManager getAddEntryMenuf for int i 0 i lt tt length i JMenuItem tmp adds add new JMenuItem tt i tmp addActionListener templateAction mb validate if progress null progress setProcess 5 table new DnDAttributeTable this table addTableMouseListener new MouseAdapter public void mouseClicked MouseEvent e TreeNode2 node tree getSelected if node null return if e getModifiers amp 8 O e getModifiers amp 4 0 tablePopup show e getComponent e getX e getY else if e getClickCount gt 2 Attributes
67. el Vector results new Vector 85 String attrs new String attribs length 1 attrs 0 objectclass System arraycopy attribs 0 attrs 1 attribs length int scope subTreeScope 2 1 subSearch url filter attrs scope results cancel return results public void setAttributeConfig AttributeConfig config String binary config getBinaryList if connections size 0 env put java naming ldap attributes binary binary else DirContext ctx null for Enumeration enume connections elements enume hasMoreElements try Ctx DirContext enume nextElement ctx removeFromEnvironment java naming ldap attributes bi nary ctx addToEnvironment java naming ldap attributes binary binary catch NamingException ex error Fallo al utilizar variable ex public void setConnectionHandler Connector con connector con private void setDefaultEnv timeout Config getTimeout limit Config getLimit listFilter Config getListFilter if listFilter null 86 listFilter objectclass attributesList Config getAttributesList showOpAttributes attributesList null env put java naming referral Config manageReferrals ignore throw env put java naming batchsize String valueOf Config getBatchSize String userdn null String userpwd null if Config adm
68. el issuerLB createLabel versionLB createLabel algorithmLB createLabel vadilityF createLabel vadilityT createLabel serialnLB createLabel setLayout new BorderLayout sizeLB new JLabel saveF new JButton Guardar como saveF addActionListener this loadF new JButton Insertar desde loadF addActionListener this viewB new JButton Ver viewB addActionListener this buttonP new JPanel buttonP add sizeLB buttonP add saveF buttonP add loadF add createCertPanel Center add buttonP South ww public void actionPerformed ActionEvent e String cmd e getActionCommand if cmd equals Guardar como 96 saveOption else if cmd eguals Insertar desde loadOption else if cmd eguals Ver externalView public boolean checkType Object value return value instanceof byte private JPanel createCertPanel JPanel pl new JPanel pl setBorder BorderFactory createTitledBorder Informacion de Certificado GridBagLayout gbl new GridBagLayout GridBagConstraints gbc new GridBagConstraints pl setLayout gbl gbc weightx 0 0D gbc anchor 13 Common add pl createLabel Asunto gbl gbc 1 0 1 1 Common add pl createLabel Issuer gbl gbc 1 1 1 1 Common add pl createLabel Va
69. el tipo de teclado que desea B lgaro utilizar para su sistema por Checoslovaco ejemplo espa ol Checoslovaco qwertz Dan s Dan s latin Dvorak Eslovaco Eslovaco Estonio Finland s Finlandes latin1 Frances Frances Canadiense Franc s lar no Frances latini Franc s pc Frances Suizo 8 Esconder Ayuda Notas de ltima hora w Siguiente Gr fico 8 Configuraci n del Teclado Configuraci n del mouse Ahora ya en espa ol selecciona su mouse de la lista si no ve su modelo deje el gen rico que viene seleccionado por defecto y pulse como no Siguiente Gr fico 9 116 Ayuda en l nea Configuraci n del rat n Elija el tipo de rat n para su sistema Tiene un rat n PS 2 Bus o serie Nota Si el conector del rat n es redondo se trata de un rat n PS 2 o un rat n Bus si es rectangular se trata de un rat n serie Busque el tipo exacto en el primer recuadro de la derecha Si no fuese posible elija uno compatible con el suyo O bien elija el tipo de rat n Gen rico apropiado Si tiene un rat n serie elija el dispositivo y el puerto al que est conectado en el siguiente recuadro B Esconder Ayuda L Notas de ultima hora Configuraci n del rat n Seleccione el rat n adecuado para el sistema I gt Modelo ALPS GlidePoint PS 2 i gt ASCII ATI Rat n Bus Generico Rat n de 2 botones USB Raton de
70. enter pp add app getProgressBar South splash add pp Dimension iSize new Dimension 250 100 splash setSize iSize width iSize height UITools center null splash splash shbew frame setCursor Browser waitCursor final Browser b new Browser app frame b setContainer frame java awt event WindowListener 1 new WindowAdapter public void windowClosing WindowEvent e 24 b exit y frame addWindowListener 1 frame getContentPane setLayout new BorderLayout frame getContentPane add b Center int height Resource getResourceAsInt window height 370 int width Resource getResourceAsInt window width 600 frame setSize width height UlTools center null frame frame shew frame setCursor Browser normCursor splash dispose b init private void processDone try SwingUtilities invokeLater new Thread public void run progressBar setValue currentProgressValue progressBar repaint 7 catch Exception exception private void setMessage final String msg try SwingUtilities invokeLater new Thread public void run progressLabel setText msg progressLabel repaint 7 catch Exception exception 25 public void setProcess int id String msg null if id 1 processDone switch id case 1
71. eto activo Si encuentran datos objetos para Actualizaci n Modifica datos de objetos Objeto activo Si encuentran datos objetos para Eliminaci n Eliminar Objetos del Servidor Objeto activo Objeto modificado Objeto eliminado Objeto desactivado Si desea continuar No desea continuar Continuar Operaciones 1 2 3 4 Diagrama Operaciones Aceptar acceso conociendo privilegios Existe Cliente del Sistema Llenar Formulario Enviar Solicitud de Acceso Creaci n de Acceso al Sistema An lisis de Solicitud Rechazado 13 R ealizar Operaciones Continuar Operaci n Almacenar Datos Verificar Datos Digta Datos del Objeto Temina Otra operaci n Busca datos odifica datos del objeto de de objetos del forma segura Actualizaci n Servidor Digta Datos del Objeto a buscar visualiza Datos Eliminar objetos del Servidor Hirrin aci n Gr fico 4 Diagrama de Operaciones 14 15 1 2 4 Diagrama de flujo de Objetos Acepta acceso Contrase a conociendo j privilegios Clientes que utilizar n la aplicaci n Llenar Formularo Formulari o E miar solicitud de acceso Formulario enviado por mail Formulario Analizar nalizadio solicitud 16 Datos Corectos Almacenar datos de forma segura Da
72. ey String e nextElement AttributeProperties p getProperties key if p isBinary attribs attribs key return attribs public AttributeProperties getProperties String attrib return AttributeProperties attrProp get attrib toLowerCase public boolean isBinary String attrib AttributeProperties prop getProperties attrib return prop null amp amp prop isBinary public void print Enumeration e attrProp keys System out printin ATTRIBUTE CONFIG AttributeProperties prop for e hasMoreElements System out println prop toString String attrID String e nextElement prop AttributeProperties attrProp get attrID System out print Atributo attrID public Hashtable read String filename Hashtable attrProp new Hashtable String editorName null String editorArgs null try BufferedReader d Common openFil 50 filename String line while line d readLine null line line trim if line startsWith line length 0 continue int index line indexOf String partl String part2 if index 1 partl line part2 null else partl line substring 0 index trim part2 line substring index 1 trim index partl indexOf if index 1 Debug error necesita
73. gOver DropTargetDragEvent droptargetdragevent public synchronized void drop DropTargetDropEvent event 64 if super parent ldap anonymousBind event rejectDrop SwingUtilities invokeLater new Runnable public void run String msg Deberia conectarse como un administrador para realizar actualizaciones JOptionPane showMessageDialog parent msg DnD Error 0 7 return try Transferable tr event getTransferable if tr isDataFlavorSupported DataFlavor stringFlavor event acceptDrop event getDropAction Object data tr getTransferData DataFlavor stringFlavor handleDropData event data toString else event rejectDrop catch Exception e event rejectDrop public void dropActionChanged DragSourceDragEvent dragsourcedragevent public void dropActionChanged DropTargetDragEvent droptargetdragevent private void handleDropData final DropTargetDropEvent event String data Point p event getLocation TreePath path super tree getPathForLocation p x p y boolean complete false 65 if path null Thread t new Thread new FinishDragThread event false SwingUtilities invokeLater t return final TreeNode2 node TreeNode2 path getLastPathComponent DAPURL destUrl node getURL DAPURL srcUrl null try srcUrl new LDAPURL data substring 2
74. gresar contrase a pl add passTF JPanel buttonP new JPanel buttonP add verifyB buttonP add okB JPanel main new JPanel main setLayout new BorderLayout main add pl North main add msgL Center main add buttonP South msgL setForeground Color black final JDialog frame new JDialog getFrame Verificar contrase a true frame getContentPane add main okB addActionListener new ActionListener public void actionPerformed ActionEvent e frame dispose final String crValue new String value ActionListener actionListener null verifyB addActionListener actionListener new ActionListener public void actionPerformed ActionEvent e String pwd new String passTF getPassword boolean rs PasswordHandler verifyPassword crValue pwd if rs msgL setText Contrase a verificada else msgL setText Contrase a no verificada 1 passTF addActionListener actionListener frame pack UITools center getFrame frame frame setVisible true private JFrame frame protected protected protected protected protected protected protected protected protected protected protected protected JLabel pwdLabel 109 JTextFiel JButton JButton 1 ld pwdTF saveF loadF JButton verifyP JButton generateP byte value boolean editMode boolean nobuttons boolean force
75. ici n de Eventos pre estados post estados TIPO DE EVENTO NOMBRE DE EVENTO PREESTADO DEL EVENTO POST ESTADO DEL EVENTO No existe Objeto Requerir Acceso Requerido Solicitud realizada alguno Solicitar Solicitud realizada MEES Solicitud en espera alguno ym er n Respuesta Esperar Solicitud en an lisis Solicitud en espera Aceptar Rechazar Dominio creado Solicitud en espera Dominio activado Crear Solicitud creada Solicitud en espera Organizaci n activada Grupos creados como Crno Camin Comun Solicitud aceptada po Administrador n C Administrador rear y 3 SE Usuario creado como gu clasificar Usuario Docente Docente Personal A oe Solicitud aceptada Personal Adm Y Serv Adm y Servicio Alumnos Alumnos Activar OBIE te ativado para Objeto creado Objeto activado consulta Objeto actualizado Modificar ae i Objeto Activado Objeto Modificado rganizacion Usuario Grupos Objeto Eliminado Eliminar Dominig ee No existe Objeto Organizacion Grupo Usuario Activado Desactivado 1 2 3 Diagrama de Operaciones Definici n de Operaciones condiciones de activaci n y Resumen 1 2 3 1 Identificar operaciones En esta secci n definimos las operaciones gue se emplean en el proyecto desde la solicitud de acceso hasta las acciones que realiza la aplicaci n sobre el directorio N OPERACIONES
76. id copy LDAPURL url boolean cut TreeNode2 node String msg null if clipboard null setError No permit l acceso al sistema ees return clipboardCut false if tree isFocused if cut 35 clipboardCut true sourceNode node msg CopyManager toString url null null else msg CopyManager toString url table getSelectedAttributes table getSelectedValues if cut cutAttributes url table getSelectedAttributes table getSelectedValues StringSelection data new StringSelection msg clipboard setContents data this clipboardOwner true public void createTemplate LDAPURL url Attributes entry if url null entry null return Attribute objectClass null String prefix null String dn url getDN objectClass getObjectClass entry if objectClass null setError Fallo en la creacion de la plantilla Especificaciones necesarias del Objectclass return prefix dn substring 0 dn indexOf Vector names new Vector objectClass size try for Enumeration enume objectClass getAll enume hasMoreElements names addElement enume nextElement catch Exception _ex Re setError Fallo valor del objectclass return Object comp new Object 2 JComboBox cb new JComboBox names cb setEditable true
77. ificaci n de los Componentes 1 4 1 Componentes m s destacados BrowserApp java package lbe import java import java import java import java ui awt awt event WindowAdapter awt event WindowEvent io File import java io PrintStream import javax swing import javax swing border BevelBorder import lbe common import lbe interfaces StartupListener Referencia al package lbe ui Ll AboutWindow Browser public class BrowserApp implements StartupListener public BrowserApp currentProgressValue 0 progressLabel null progressBar null progressLabel new JLabel Cargando espere progressLabel setAlignmentX 0 5F progressBar new JProgressBar 0 6 progressBar setValue 0 progressBar setStringPainted true public void done processDone 22 public JProgressBar getProgressBar return progressBar public JLabel getProgressLabel return progressLabel public static void main String args String vers System getProperty java version if vers compareTo 1 1 2 lt 0 System out println WARNING Swing debe trabajar con java 1 1 2 o version VM String file String base for int i 0 if args i null null i lt args length i equalsIgnoreCase f if i 1 gt args length System err println f requiere un argumento
78. inLogin userdn Config getManagerDN userpwd Config getPassword if userdn null amp amp userpwd null env put java naming security principal userdn env put jJava naming security credentials userpwd anonymousBind false else env remove java naming security principal env remove java naming security credentials anonymousBind true env put java naming security authentication Config getSecurityAuthentication String saslClientPkgs Config getSaslClientPkgs if saslClientPkgs null env put javax security sasl client pkgs saslClientPkgs else env remove javax security sasl client pkgs env put java naming ldap derefAliases Config getAliasingOption env put java naming ldap deleteRDN Config deleteOldDN true false version Config getVersion env put java naming ldap version String valueOf version String securityProtocol Config getSecurityProtocol if securityProtocol null env put java naming security protocol securityProtocol if securityProtocol egualsIgnoreCase ssl 87 env put java naming ldap factory socket Config getLdapSocketFactory else env remove java naming security protocol env remove java naming ldap factory socket if Debug ldapDebug env put com sun jndi ldap trace ber System err String leafAttr Config getLeafIndicator if leafAtt
79. istener public void actionPerformed ActionEvent e String pwd new String passTF getPassword String alg defaultAlgorithm if forceAlgorithm String digest new String value if digest regionMatches true 0 CRYPT 0 7 alg CRYPT else SHA 0 MD5 Os SMD5 O 5 SSHA O 6 5 6 if digest alg else if digest alg else if digest alg else if digest alg regionMatches true SHA 1 regionMatches true SHA 1 regionMatches true MD regionMatches true MD String password 7 passTF addActionListener actionListener PasswordHandler generateDigest pwd if password value set null alg null password getBytes frame dispose frame pack UITools center getFram frame O frame setVisible true public void setReguired boolean flag public void setValu if new_value val else Va set JButton verifyB Lue lue return true Object new_value null new byte 0 byte new_value public boolean verify private void verifyOption new JButton Verificar 107 108 JButton okB new JButton Salir final JLabel msgL new JLabel 0 final JPasswordField passTF new JPasswordField 20 JPanel pl new JPanel pl add new JLabel In
80. izada la instalaci n de los paquetes haga clic sobre el bot n Reiniciar Gr fico 18 2 6 Instalaci n configuraci n y ejecuci n de OpenLdap como servidor de directorio 2 6 1 Descarga e instalaci n de OpenLdap Si no instalamos los paquetes de OpenLDAP en la instalaci n de Linux Distribuci n Fedora Core4 debe descargar la versi n 2 2 23 5 Adem s se requerir los siguientes paquetes _openldap clients 2 2 23 5 _openldap servers 2 2 23 5 authconfig 4 6 12 1 authconfig gtk 4 6 12 1 opcional 129 Instalaci n de OpenLdap v a l neas de comando 1 Una vez obtenido el archivo Tar que contiene OpenLDAP este debe ser descomprimido en un directorio temporal tmp por lo general para poder iniciar la instalaci n 2 Dentro del directorio temporal tmp donde fue descomprimido OpenLDAP ejecute el comando configure este comando configura los archivos de instalaci n de acuerdo a su sistema 3 Posteriormente debe ejecutar make depend seguido de make esto genera OpenLDAP dentro del mismo directorio temporal 4 Debe ejecutar ciertas pruebas para garantizar que OpenLDAP funcione correctamente col quese dentro del directorio tests y ejecute make 5 Ahora si debe instalar OpenLDAP en el sistema descienda del directorio tests y como root ejecute make install 6 El comando anterior instala OpenLDAP bajo el directorio usr local etc openldap 130 2 6 2 Configuraci n del Servidor
81. l throws MalformedURLException try e J url URLDecoder d url catch Exception e throw new MalformedURLException e getMessage int pl if pl url indexOf 1 throw new MalformedURLException necesitando protocol String protocol pl 3 int p2 String base if p2 base url substring 0 pl url indexOf null pl 1 url substring pl parseHostPort base dn else base p2 dn int p if p3 dn url un T url substring pl p2 substring p2 dn indexOf 1 dn substring 0 3 1 p3 parseHostPort base public LDAPURL String host int port String dn 68 this host host this port port this dn dn public static String encode String toEncode StringBuffer encoded new StringBuffer toEncode length 10 for int currPos 0 currPos lt toEncode length currPos char currChar toEncode charAt currPos if currChar gt a amp amp currChar lt z currChar gt A amp amp currChar lt Z currChar gt 0 amp amp currChar lt 9 S _ r indexOf currChar gt 0 encoded append currChar else encoded append ncoded append hexChar currChar amp Oxf0 gt gt 4 ncoded append hexChar currChar amp Oxf return encoded toString
82. lido desde gbl gbc 1 2 1 1 Common add pl createLabel a gbl gbc 1 3 1 1 Common add pl createLabel Sig Algorithm gbl gbc 1 4 1 1 Common add pl createLabel Numero Serial gbl gbc 3 4 1 1 Common add pl createLabel Version gbl gbc 5 4 1 1 gbc weightx 1 0D gbc anchor 17 Common add pl subjectLB gbl gbc 2 0 5 1 Common add pl issuerLB gbl gbc 2 1 5 1 Common add pl vadilityFLB gbl gbe 2 2 5 tys Common add pl vadilityTLB gbl gbc 2 3 5 13 3 Common add pl algorithmLB gbl gbc 2 4 1 1 Common add pl serialnLB gbl gbc 4 4 1 1 Common add pl versionLB gbl gbc 6 4 1 1 return pl 97 private JLabel createLabel JLabel lb new JLabel lb setForeground Color black return lb private JLabel createLabel String text JLabel 1 lb new JLabel text return lb private void externalView File tmpF null try tmpF File createTempFile certviewer mert catch IOException e System err println Unable to create tmp files Wd getMessage return tmpF deleteOnExit Common saveAsBytes tmpF value String viewcmd null if cmdstr null viewcmd new String rundll32 exe cryptext dll CryptExtOpenCER tmpF getAbsolutePath os els
83. ll edit add newMenuItem Afiadir Atributo D null edit add nem JSeparator addNoneEmptyAttribCB newCheckboxMenultem A adir solo atributos no inicializados t addnoneempty edit add addNoneEmptyAttribCB mb add edit return mb public JCheckBoxMenuItem newCheckboxMenultem String label char men String cmd JCheckBoxMenuItem tmp new JCheckBoxMenuItem label tmp setMnemonic men tmp addActionListener this if cmd null tmp setActionCommand cmd return tmp public JMenuItem newMenuItem String label char men String cmd JMenuItem tmp new JMenuItem label tmp setMnemonic men tmp addActionListener this if cmd null tmp setActionCommand cmd return tmp public void setTitle String title super setTitle title private EditPanel editPanel private JButton applyButton private JButton cancelButton private 55 JCheckBoxMenuItem addNoneEmptyAttribCB private AttributeConfig attrProp private Attributes newAttribs private DirTree java public class implemen TreeSelectio public D supe sort pare root tree tree tree Angled JScr scro 200 sero JFrame frame DirTree extends JPanel ts TreeExpansionListener nListener irTree Browser p r true Option nt p new TreeNode2 root Model new DefaultTreeModel root new JTree treeModel
84. lue Common readAsBytes f return public void reguestFocus super reguestFocus private void saveOption File f getFile Save if f null return else Common saveAsBytes f value return public void setArguments String args if args null return boolean externalView false String argsV Common parseArgs args int size argsV length for int i 0 i lt size itt String arg argsV i if arg egualsIgnoreCase ext externalView true else if arg egualsIgnoreCase extcmd amp amp 1 1 lt size itr 100 cmdstr argsV i else System err println CertificateEditor Argumento desconocido arg if externalView buttonP add viewB else buttonP remove viewB public void setEditMode boolean edit if edit buttonP add loadF else buttonP remove loadF private void setFields X509Certificate cert String text null text cert null cert getSubjectDN toString N A subjectLB setText text text cert null cert getIssuerDN toString N A issuerLB setText text text cert null String valueOf cert getVersion N A versionLB setText text text cert null cert getSigAlgName N A algorithmLB setText text text cert null cert getNotBefore toString N A 1 U ct vad tyF setText text
85. myurl filter 0 attributes subscope Cancelable xporter if rs return rs moreReferrals e skipReferral try 78 ctx DirContext e getReferralContext catch NamingException ex catch NamingException e error Fallo durante exportacion e return false return true public LDAPURL findEntryName LDAPURL url DirContext ctx connect url if ctx null return null Name name parse url getDN String base name getPrefix name size 1 toString String dn url getDN String rdn name get name size 1 toString int i 1 boolean foundName true while foundName try NamingEnumeration results search ctx dn objectclass DEFAULT ATTR 0 false results close if i 1 rdn rdn copy else if i 2 rdn rdn WW o fog else if i gt 3 rdn rdn substring 0 rdn length TY se HS dn rdn base itr catch NameNotFoundException ex foundName false return new LDAPURL url getHost url getPort dn catch NamingException _ex return null 79 return null private String fixName String name if name length gt 0 amp amp name charAt 0 int size name length 1 StringBuffer buf new StringBuffer for int i 1 i lt size i if name charAt i buf append buf appen
86. nfigurar el huso horario a trav s del mapa A trav s de esta opci n puede elegir su posici n Eligiendo Visualizaci n las opciones disponibles son Mundo Norteam rica Suram rica el Pac fico Europa frica y Asia Localizaci n Descripci n Observe las dos pesta as en la Europwronares Gran srerana parte superior de la pantalla La primera pesta a le permite Europa mem burgo configurar por ubicaci n Europa Malta IH Puede tambi n moverse en la FumnafMinsk ly lista de las ciudades y elegir el 4 Pl huso horario deseado a Cl El sistema horaro usar UTC v E Esconder Ayuda Notas de ltima hor Antenor 9 smere Gr fico 15 Configuraci n de Uso Horario En el mapa seleccione America Guayaquil Pulse Siguiente Contrase a del Root Asigne una clave de acceso al usuario root Debe escribirla dos veces a fin de verificar que esta coincide con lo que realmente se 125 espera Por razones de seguridad se recomienda asignar una clave de acceso que evite utilizar palabras provenientes de cualquier diccionario en cualquier idioma as como cualquier combinaci n que tenga relaci n con datos personales Gr fico 16 una buena clave contiene ocho o m s caracteres entre los cuales tenemos letras n meros y caracteres especiales para evitar que sea f cil de descifrar Ayuda en linea Col i la mase a de r a troduzca la omrasel de root
87. ntext ctx new InitialDirContext env connections put base ctx if version 3 amp amp indicatorAttr null listAttrs indicatorAttr else listAttrs DEFAULT ATTR if parser null parser ctx getNameParser return true catch NamingException e error Fallo al concectar a base e return false private boolean modifyAttribute LDAPURL url ModificationItem mods throws NamingException DirContext ctx connect url if ctx null return false try ctx modifyAttributes url getDN mods catch ReferralException e LDAPURL myurl getReferralUrl e return modifyAttribute myurl mods return true public Name parse String dn try return parser parse dn 83 catch NamingException _ex return null public Attributes read LDAPURL url DirContext ctx connect url if ctx null return null Attributes attrs null try if showOpAttributes attrs ctx getAttributes url getDN attributesList else attrs ctx getAttributes url getDN catch ReferralException e LDAPURL myurl getReferralUrl e if myurl getDN length 0 myurl setDN url getDN return read myurl catch CommunicationException e if connector null error Error de comunicacion x url getBase e return null if connector connectionFailed url
88. null return if editWindow null editWindow new EditWindow frame aConfig Timer t new Timer 20 new ActionListener public void actionPerformed ActionEvent e editWindow setTitle Editar url_tmp getDN editWindow init url_tmp attribs mode Attributes newat editWindow getChanges if newat null return busy Actualizando entrada if ldap updateEntry url_tmp newat read url_tmp y t setRepeats false t start public void exit rd stop ldap disconnect if viewWindow null viewWindow dispose 39 if editWindow null editWindow dispose if history null history dispose if propertiesMask amp 0x10 0 System exit 0 private JFileChooser getFileChooser if filechooser null filechooser new JFileChooser filechooser setFileFilter new CustomFileFilter cfg Archivo conf cfg return filechooser public String getName String dn return ldap getName dn private Attribute getObjectClass Attributes entry String id null for Enumeration enume entry getIDs enume hasMoreElements id String enume nextElement if id egualsIgnoreCase objectclass return entry get id return null public Attributes getSelected2 String attributes int size attributes length if size 0
89. oid loadOption File f getFile if f null 104 return else setValue Common readAsBytes f return public void reguestFocus super reguestFocus private void saveOption File f getFile if f null return else Common saveAsBytes f value return private void set String vl new String value if editMode pwdTF setText vl else pwdLabel setText vl public void setArguments String args nobuttons false defaultAlgorithm SHA 1 forceAlgorithm false debugMode false if args null Hashtable h Common args args new String algorithm new String nobuttons force debug 1 if h get nobuttons null nobuttons true if h get force null forceAlgorithm true 105 if h get debug null debugMode true String tmp String h get algorithm if tmp null defaultAlgorithm SHA 1 else if tmp egualsIgnoreCase SHA defaultAlgorithm SHA 1 else if tmp egualsIgnoreCase MD5 defaultAlgorithm MD5 else defaultAlgorithm tmp if debugMode if String msg PasswordEditor if forceAlgorithm msg msg Forzando else msg msg Usando msg msg defaultAlgorithm algorithm System out println msg nobuttons saver new JButton Guardar como
90. ormaci n ono instalar un entorno gr fico concemiente a las diferencias entre estas clases de instalaci n Partonallz da consulte el Manual de instalaci n O EZ Seleccione el tipo de instalaci n para obtener control completo s obre el Cal d procesode instalaci n inchryendo la selecci n del paquete de software de Red Hat Linux v las preferencias de la autenticaci n E Esconder Ayuda Notas de ltima hora Gr fico 10 Tipo de Instalaci n Configuraci n de la partici n Existen dos formas Automatica Manual con Disk Druid Ayuda en linea Configuraci n del disco Elija donde le gustaria instalar Red Hat Linux Si no sabe como crear particiones en su sistema consulte la secci n de Fa ER de Red Hat Dispositivo RAID Volumen Tipo VB Discos duros Si ha usado el particionamiento Y dev hda automatico puede o bien dev hda ext3 55 1 aceptar las configuraciones dewjhdaz m s soos 8 al actuales de las particiones devjhda3 Sus y SIR MB 7 Lc lat aqua der dev hda4 Extendida 32577 712 48 usando la herramienta para el dev hda a BW 712 21 particionamiento manual deu hdas vfat 11005 21153988 a FEE ae porcino ig das is d L Esconder el dispositivo RAID los miembros del grupa de volumen LVM particionamiento en el Manual 118 Particionamiento xi Drive dev hda Geom 4864 255 63 Model HITACHI DK23DA 40 hda7
91. ortaci n de LDIF La importaci n y exportaci n se realiza en formato LDIF Para crear nuevos nodos se puede utilizar LDIF Exporte el dn modifique las entradas que desea e importe el LDIF Gr fico 47 Ayuda Notas 166 Y finalmente encontramos la opci n About que hace referencia a donde se presenta el nombre de la aplicaci n la versi n y la direcci n web donde nos pueden contactar Gr fico 48 Servicio de Directorio LDAP BAA Archivo Editar Yer LDIF Ayuda IP OM BIBA BE ER Atributos Servicio de Directorio EER Servicio de Directorio LDAP 1 version 1 UG CISC 3SGO4 email sds hotmail com Creado por U G CISC 35G04 Grafico 48 Ayuda About
92. pw secret rootpw MD5 pF 1 EwLEUSTF iWOX52ySYA directory Directorio d nde se guardar n todos los datos del directorio LDAP directory war lib ldap 134 2 6 3 Ejecuci n y Comprobaci n del Servidor OpenLdap Ejecuci n del Servidor Se inicia el servicio de LDAP a adiendo ste al resto de los servicios que arrancan junto con el sistema service Idap start chkconfig ldap on Se edita el fichero usr share openldap migration migrate_common ph Se modifica los valores de las variables DEFAULT_MAIL_DOMAIN y DEFAULT_BASE Guedando del siguiente modo Default DNS domain DEFAULT MAIL DOMAIN uquil com Default base DEFAULT BASE dc uquil de com 135 A continuaci n se genera un fichero base ldif gue a su vez contendr el resto de los datos en el directorio usr share openldap migration migarte_base pl gt base ldif Se procede a insertar la informaci n generada en el directorio utilizando lo siguiente Ldapadd x W D cn root dc uquil dc com h 127 0 0 1 base ldif Gomprobacion del Servidor Antes de configurar el sistema para utilizar LDAP es conveniente verificar que todo funciona correctamente El siguiente mandato debe devolver toda la informaci n del directorio solicitado dc uquil dc com Ldapsearch x b dc uquil dc com objectclass 2 6 4 Configuraci n de Clientes Se definen los valores para los par metros host y base a
93. r null indicatorAttr new Stringl leafAttr 7 indicatorType Config getLeafIndicatorType String provider Config getJndiProvider env put java naming factory initial provider null Object provider Object DEFAULT CTX public void showOpAttributes boolean show showOpAttributes show private boolean subSearch LDAPURL url String filter String attribs int scope Vector rs Cancelable cancel DirContext ctx connect url if ctx null return false String entryDN null Attributes at null Attribute a null LDAPURL myurl null int subscope 0 String baseDN url getDN boolean moreReferrals true while moreReferrals try Vector vl for NamingEnumeration results search ctx baseDN filter attribs scope results hasMore rs addElement v1 88 SearchResult si SearchResult results next if cancel isCanceled results close return false vl new Vector attribs length entryDN getFixedDN si getName baseDN myurl new LDAPURL url getHost url getPort entryDN vl addElement myurl at si getAttributes for int i 1 i lt attribs length 1 a at get attribs i if a null vl addElement N A else Object v a get if v instanceof byte vl addElement Common format byte v else vl addElement a get
94. rectorio donde se encuentra almacenada la informaci n Gr fico 26 Servicio de Directorio LDAP Archivo Editar Ver LDIF Ayuda BaBe emnnxX WWE amp Conectar al Servidor EE NT yn Gd iLista de Sesion Lista de Sesiones 1 browser Nuevo nueva pruebas Editar Copiar Borrar Renombrar Conectar Cancelar Creado por U G CISC 35G04 Gr fico 26 Conectar con el Servidor Pesta a Lista de Sesiones Cuando seleccionamos nuevo o editar aparece Editar Sesi n en esta ventana colocaremos los datos necesarios para la conexi n si lo haremos de forma segura seleccionando SSL o con por el puerto por defecto el 389 adem s deberemos especificar si somos usuarios an nimos o administradores luego de digitar 146 estos datos debemos guardar estos par metros y procedemos a conectarnos Gr fico 27 Editar Sesi n Sesion i Opciones Informaci n del Host Host 192 168 3 1 Puerto 389 SSL Anonimo Base DN dc uguil de com v Informaci n Usuario Usuario DN cn root afiadido base DN Contrase a Guardar Cancelar Gr fico 27 Editar Sesi n Conexi n r pida El usuario se conecta sin necesidad de crear una sesi n pero deber ingresar los datos de configuraci n como host ejemplo 192 168 3 1 dn ejemplo dc uquil dc com puerto ejemplo 389 o 636 los mismos que pudimos observar en Editar Sesi n
95. ring return else LDAPURL url null TreeNode2 selectedNode tree getSelected if selectedNode null setWarning Entrada no selecccionada Por favor seleccionar una entrada return url selectedNode getURL if cmd equals UP tree selectParent selectedNode else if cmd equals TreeA tree sort true else if cmd equals TreeD tree sort false else if cmd equals Eliminar Entrada DeleteEntryWindow w new DeleteEntryWindow ldap tree getSelectedNodes tree UITools center frame w w setVisible true else if cmd equals Ver Entrada view frame url currAttrib else if cmd equals ldifE LDIFExportWindow w new LDIFExportWindow ldap tree getSelectedEntries UITools center frame w w setVisible true else if cmd eguals ldifI 32 LDIFImportWindow w new LDIFImportWindow ldap url tree UITools center frame w w setVisible true else if cmd eguals Refrescar tree rebuildNode selectedNode dk else if cmd eguals Agregar Atributo addAttribute url else if cmd equals Renombrar Entrada renameEntry selectedNode url else if cmd equals Editar Entrada edit frame url currAttrib 3 else if cmd equals Editar Atributo String at ta
96. rtual del sistema Debe asignarse el doble del tama o del RAM f sico usr Contiene la mayor a de los binarios ejecutables bibliotecas compartidas manuales datos de aplicaciones e im genes que utiliza el sistema cabeceras de desarrollo el rbol del kernel y documentaci n tmp En ste se almacenan todos los ficheros temporales que generan los distintos programas var Corresponde a la partici n de datos de servicios home Es donde se colocan los directorios para cada usuario con los perfiles de cada cuenta Haz clic sobre manual y pulsaremos Siguiente 121 Configuraci n del Cortafuegos No configure cortafuegos en este momento La herramienta utilizada para tal fin system configsecuritylevel crea un cortafuegos simple y con muchas limitaciones Se recomienda considerar otras alternativas como Firestarter o Shorewall Deje activo SELinux ya que ste proveer al sistema de seguridad adicional Al terminar haga clic sobre el bot n Siguiente Gr fico 12 Un cortafwegos puede ayudare a preven accesos no autorizados a su Configuraci n del computadora del mundo extenor Quiere habilitar un cortafuegos Ning n cortafuegos cortafuegos Habilitar cortafuegos El cortafuego est ubicado 7 k entre su ordenador y laa determina qu recurs Advertencia Ning n cortafuegos ordenador est n al ale los usuarios remotos Si este sistema est conectado drectamente a
97. sferEntry fromUrl dstUrl delete replace public boolean transferEntry LDAPURL fromUrl Attributes ats LDAPURL toUrl boolean delete boolean replace if delete amp amp deleteEntry fromUrl return false if updateEntry toUrl ats replace return true if delete addEntry fromUrl ats return false public boolean transferEntry LDAPURL fromUrl LDAPURL toUrl boolean delete boolean replace Attributes ats read fromUrl if ats null return false else return transferEntry fromUrl ats toUrl delete replace private boolean transferTreeSub LDAPURL fromUrl LDAPURL toUrl boolean delete boolean replace Cancelable cancelable ProgressListener listener DirContext ctx connect fromUrl if ctx null return false Attributes ats read fromUrl if ats null return false String srcDN fromUrl getDN String dstDN toUrl getDN boolean createdBase false boolean rc false boolean moreReferrals true while moreReferrals try NamingEnumeration results search ctx srcDN objectclass DEFAULT ATTR 1 false if results hasMore if transferEntry fromUrl ats toUrl delete replace return false else 91 String name null if createdBase if updateEntry toUrl ats replace return false createdBase true DAPURL srcUrl DAPURL dstUrl for re
98. sults hasMore transferTreeSub srcUrl dstUrl delete replace cancelable listener if cancelable null amp amp cancelable isCanceled results close return false SearchResult si SearchResult results next name fixName si getName String tmpSrcDN getDN name srcDN srcUrl new LDAPURL fromUrl getHost fromUrl getPort tmpSrcDN String tmpDstDN getDN name dstDN dstUrl new LDAPURL toUrl getHost toUrl getPort tmpDstDN if listener null listener msg tmpSrcDN tmpDstDN if delete amp amp deleteEntry fromUrl return false moreReferrals false catch ReferralException e if delete moreReferrals false else if createdBase if updateEntry toUrl ats replace return false 92 createdBase true DAPURL srcUrl getReferralUrl e String tmpDstDN getName srcUrl getDN dstDN DAPURL dstUrl new LDAPURL toUrl getHost toUrl getPort tmpDstDN boolean rs transferTreeSub srcUrl dstUrl delete replace cancelable listener if rs return false moreReferrals e skipReferral try ctx DirContext e getReferralContext catch NamingException _ex catch NamingException e if listener null listener error Transferencia fallida 4 getMessage null error
99. t 58 return nodes public boolean isFocused return tree hasFocus public boolean isSelected return tree getSelectionCount 0 public void rebuildNode TreeNode2 node nableListeners false expand node nableListeners true public void rebuildRoot nableListeners false expand root nableListeners true public void selectDN String dn Name name parent parseDN dn if name null parent setWarning El valor seleccionado es probablemente invalido DN return int crsize name size if crsize 0 parent setWarning Zero length DN return Name rt parent parseDN root getURL getDN int rtsize rt size if crsize lt rtsize parent setWarning No hay suficientes componentes return String rtName null String crName null for int i 0 i lt rtsize i 59 rtName getName rt i crName getName name i if rtName equalsIgnoreCase crName parent setWarning No en este rbol Mua an return TreePath t new TreePath root if rtsize crsize tree setSelectionPath t else selectNode t name rtsize public void selectNode TreePath path Name name int index TreeNode2 tmp TreeNode2 path getLastPathComponent Name crNode null String crName null LDAPURL url null String selName
100. tDN url getDN private void setConnectionButtons boolean enableConnect menuManager setConnectionButtons enableConnect public void setContainer Container con container con public void setError String m String e status setForeground Resource getErrorColor setStatus m e StringBuffer buf new StringBuffer m buf append inReason buf append e toString buf append An history log buf toString container setCursor normCursor if Config popupErrorWindow history setVisible true public void setFeedback String m status setForeground Resource getMsgColor setStatus m null protected void setProperties int props propertiesMask props public void setStatus String m String e status setText m status setScrollOffset 0 status setToolTipText e 46 public void setTitle String title if frame null frame setTitle title public void setWarning String m String e status setForeground Resource getWarningColor setStatus m e public void synchRead LDAPURL url rd synchRead url private boolean testSelectedAttributes String attr if attr null attr null amp amp attr length 0 setWarning Atributo s no seleccionado Seleccione attribute s antes utilizar esta funcion return false else return true public void transferTreeUI LDAPURL srcUrl Tr
101. tarse Contiene funciones de creaci n del arbol createtree a adir un nodo addnode eliminaci n de un nodo deletenode mostrar los nodos hijos de las entradas expana LdapURL Ibe common Permite conocer con que dominio se conectar el cliente Coloca el rbol de directorio en el JPanel agregando adem s el scroll En esta clase se encuentran las funciones para obtener host getHost puerto getPor dn getDN modificaci n de host puerto y dn guardar la configuraci n de acuerdo al puerto escogido JNDI Java Naming and Directory Interface Ibe Idap Librer a que contiene todas las funciones de manipulaci n del directorio permiti ndonos a adir atributos addAttribute a adir entradas addEntry comparaciones compare leer atributos Attributesread conexiones connect desconectar disconnect resetear conexi n resetConnection eliminar atributos deleteAttribute eliminar entradas deleteEntry eliminar el arbol deleteTree buscar entradas findEntryName modificar entradas modifyAttribute Renombrar entrada renameEntry actualizar atributo updateAttribute actualizar entrada updateEntry busguedas search etc CertificateEditor2 Ibe editor Permite la exhibici n de los certificados X 509 21 PasswordEditor lbe editor Genera guarda inserta verifica y encripta contrase as utilizando el algoritmo de encriptaci n SHA 1 4 Cod
102. tes binary private static final String LDAP SOCKET FACTORY java naming ldap factory socket private static final String SASL CLIENT PRGS javax security sasl client pkgs private static String DEFAULT CTX com sun jndi ldap LdapCtxFactory public static final int BASE 0 public static final int ONE 1 public static final int SUB 2 private Hashtable connections private Connector connector private int limit private int timeout private int version 93 94 private boolean anonymousBind private int indicatorType private String indicatorAttr private String listAttrs private String listFilter private String attributesList private NameParser parser private boolean showOpAttributes private Properties env protected ErrorListener listener 95 CertificateEditor2 java package lbe editor import java awt import java awt event ActionEvent import java awt event ActionListener import java io import java security cert CertificateFactory import java security cert X509Certificate import java text MessageFormat import javax swing import lbe common Common import lbe interfaces AttributeEditor public class CertificateEditor2 extends JPanel implements AttributeEditor ActionListener private static final long serialVersionUID 9119579697924218043L public CertificateEditor2 value null subjectLB createLab
103. to 389 que realiza las conexiones sin cifrar Para configurar el servidor en modo seguro debemos tenerlo funcionando correctamente por el puerto 636 139 OpenLDAP tiene dos formas de comunicaci n segura SSL y TLS SSL opera en otro puerto el 636 y desde el principio realiza las comunicaciones encriptadas en modo seguro TLS utiliza el puerto estandar 389 para iniciar las comunicaciones y gue despu s cambia a modo seguro a trav s del citado puerto 636 Es conveniente tener los dos tipos activados ya gue no todas las aplicaciones cliente soportan este m todo e incluso hay aplicaciones gue no soportan las transmisiones seguras Para activar los puertos 389 y 636 es necesario digitar las siguientes l neas slapd h ldaps ldap 127 0 0 1 978 Se debe verificar que slapd este funcionando por ambos puertos y para ellos se hace lo siguiente netstat alpn grep slapd Si sale algo similar al gr fico 23 significa que esta escuchando por ambos puertos root localhost netstat alpn grep slapd tcp 0 0 0 0 0 0 389 EN 7274 slapd tcp 0 0 0 0 0 0 636 EN 7274 slapd tcp 0 0 389 EN 7274 slapd tcp 0 0 636 EN 7274 slapd unix 2 BA DGRAM Comprobaci n de Puertos abiertos 140 0 0 0 0 0 0 0 0 166325 7274 slapd Para las transmisiones seguras hace falta un certificado en formato PEM para la llave SSL Normalmente se necesitaria que una organizaci n dedicada a gener
104. toString moreReferrals false catch ReferralException e myurl getReferralUrl e subscope scope 1 scope 0 boolean error subSearch myurl filter attribs subscope rs cancel if error return error moreReferrals e skipReferral try ctx DirContext e getReferralContext catch NamingException ex catch NamingException e 89 error Fallo Busgueda e return false return true public boolean synchEntry LDAPURL url Attributes ats DirContext ctx connect url if ctx null return false try ctx modifyAttributes url getDN 2 ats catch ReferralException e LDAPURL myurl getReferralUrl e return synchEntry url ats catch NameNotFoundException _ex try ctx createSubcontext url getDN ats catch NamingException _ex2 return false catch NamingException e error Fallo al sincronizar entradas e return false return true public boolean transfer LDAPURL fromUrl LDAPURL toUrl boolean delete boolean replace boolean withChildren Cancelable cancelable ProgressListener listener LDAPURL dstUrl toUrl int rc compare fromUrl toUrl if rc 1 dstUrl findEntryName dstUrl if withChildren return transferTreeSub fromUrl dstUrl delete replace cancelable listener else 90 return tran
105. top objectClass person telephoneNumber 2866120 sn sofia espinoza cn sofia Aplicar Cancelar Gr fico 38 Ventana de Editar Eliminaci n si se reguiere hacer eliminaciones tanto de entradas como de atributos se procede haciendo clic en en el bot n i o dando clic en la opci n editar Eliminar Atributo o Eliminar Entrada dependiendo de lo que se quiera eliminar Esta pantalla permitir al usuario eliminar el nodo Si el nodo a eliminar tiene sub niveles tiene que estar seleccionada la opci n con hijos Caso contrario la aplicaci n mostrar un mensaje de error en la barra de estado y no permitir la eliminaci n del nodo Gr fico 39 156 Eliminar Entrada Eliminar Cancelar Gr fico 39 Eliminar Entrada Podemos realizar otras operaciones como copiar entradas moverlas crear plantillas de entradas estas opciones las podemos encontrar en el men Editar as como tambi n podemos renombrar las entradas agregar atributos a una entrada Mover entrada Esta opci n nos permite trasladar una entrada de un dn a otro Denominamos dn la ruta de ubicaci n de la entrada dentro de la jerarqu a del rbol del Servidor de Directorio LDAP Seleccionamos la entrada que deseamos mover y presionado clic derecho lo arrastramos hasta el dn destino de la entrada Al realizar esta acci n se presenta la ventana Mover Entrada en la cual nos presenta el dn donde se encuentra actualmente la en
106. tos Digita Datos Pantalla de verificar del Objeto Ingreso Datos Almacenados Ea Realiza Pantalla de Operaciones Menu Digita datos del objeto u objetos abuscar Servidor PE A Pantalla de ingreso de datos para busqueda del objeto u objetos del servidor Interfaz de visualizaci n de visualizar Datos Resultado de busqueda de datos en servidor odificar datos Pantalla de de objetos del actualizaci n de servidor datos Eliminar datos de objetos del servidor Pantalla de eliminaci n de datos Gr fico 5 Diagrama de Flujo de Objetos 1 2 5 Diagrama General To existe objetos del Digta Datos Realizar dal Dien Operaciones 17 18 Revisar Acceso Objeto no existerte Llenar Enviar solicitud Formulario de acceso EI Apceso por analizar Solicita Acceso An lisis de acceso al respuesta al Cliente Cliente Gr fico 6 Diagrama General 19 1 3 Diccionario de Datos Clases Archivos de Configuraci n Descripci n Atributes config El archivo atributes config carga las configuraciones de acci n gen rica de la configuraci n aplicable a cualquier sesi n del ldap Especifica los tipos de datos para almacenar certificados contrase a mail etc Archivos cfg Son archivos gue contiene informaci n de configuraci n de los par metros utilizados para la
107. trada y el dn 157 destino a donde se colocar la entrada antes de aceptar la acci n debemos seleccionar si deseamos el traslado de la entrada con los nodos hijos y si deseamos que sea un nuevo dn Gr fico 40 Servicio de Directorio LDAP Idaps 192 168 3 1 dc uquil de com BER Archivo Editar Ver LDIF Ayuda WREKEN ANN J desuquil de com Atributos Valor 5 HJ ou rectorado objectClass top 10 HE amp ou vicerrectori Mover Entrada Al RK Lg o organizacio 9 Desde DN cn cede ou rectorado de uquil de com 3 Para DN ou vicerrectorado de uquil de com Destino DN como v b con hijofos Mover Cancelar Gr fico 40 Mover Entrada Copiar entrada Primero seleccionamos la entrada que deseamos copiar luego en el men Editar seleccionamos la opci n Copiar Entrada aparecer la ventana 158 de Mover Entrada pero esta contiene una diferencia de la anterior el destino dn se digita es decir colocaremos la ubicaci n donde gueremos copiar la entrada seleccionada Gr fico 41 Archivo Editar Ver LDIF Ayuda CETVYYT YE XET Atributos Valor objectClass top dels Desde DN cn cede o organizacionadmin de uquil de com Para DH cede o organizacionadmin de uguil de com Destino DN como v base DN nuevo DN con hijofos Mover Cancelar Gr fico 40A Copiar Entrada Nota Luego de Mover un atributo y o copiar una entrada de
108. un panel un escritorio iconos del sistema y defecto y para a adir o eliminar gestores de ficheros gr ficos paquetes opcionales desde Entorno de escritorio para KDE 0 16 se grupa KDE es una inter az de usuario gr fica y potente que A incluye un panel un escntorio iconos del sistema y un Para seleccionar los paguetes gestor gr fico de ficheros individualmente tendr que activarla casilla Selecci n Aplicaciones individual de los paguetes 7 Editores 2 4 Detalles presente en la parte inferior de Existen programas que permiten crear y modificar ficheros la pantalla cyf a veces llamados editores de texto Estos incluyen Emacs Y Mk Usando la visualizaci n en Ingenier a y cient fico 07 rbol ver una lista de grupos a es i des H grupo incluye paquetes para ejecutar calculos de BEE a api Pa V matem ticos y cientificos y trazados as como la e ista y escoja un grupo la RR An de la cidad ista de paguetes de ese grupo LI Selecci n de paquetes individuales Tama o total de la instalaci n 1 680M anarmmacersaenelnanaldalaz _ _ XL 5 Esconder Ayuda 1 Notas de ltima hora Anterior gt Siguiente Gr fico 17 Selecci n de Grupo de Paquetes En esta parte es necesario recalcar que se deber escoger solo los paquetes necesarios para el servidor entre ellos tenemos OpenLdap servers OpenLdap clients Telnet OpenSSL dependencias opcionales de Java Ldap jdk Ldap jdk javado
109. unt gt 2 history setVisible true rd new ReadThread this rd start if progress null progress done ldap public void actionPerformed Actionl String cmd if cmd eguals Conectar openConnectWindow else if cmd eguals Salir exit else if cmd eguals Desconectar disconnect else if cmd eguals Reconectar reconnect else if cmd equal Ls NewWindow JFrame new JFrame Browser p p setContainer f f getContentPane add p f pack f setVisible true p init else if cmd eguals TableA table sort true else if cmd eguals TableD table sort false else if cmd eguals ErrorLog history setVisible true else if cmd eguals Grabar config saveConfiguration else if cmd eguals Abrir config readConfiguration else if cmd eguals VerAttributes AbstractButton ct AbstractButton e getSource ldap showOpAttributes ct i else if cmd eguals Buscar DN new Browser null 30 Event e e getActionCommand sSelected 31 Object val table getSelectedValue if val null setWarning Atributo no seleccionado Seleccionar un atributo return if val instanceof String tree selectDN val toString else setWarning El valor seleccionado no es string Seleccionar un valor st
110. url getDN at catch ReferralException e LDAPURL myurl getReferralUrl e return addEntry myurl at catch NamingException e error Fallo al agregar nueva entraeda url getDN e return false return true public void addErrorListener ErrorListener ls listener ls public boolean anonymousBind return anonymousBind private void checkLeaf TreeNode2 node Attributes attrs Attribute n null TreeNode2 more new TreeNode2 nothing here if indicatorAttr null attrs null node add more return n attrs get indicatorAttr 0 if n null node add more return try if indicatorType 0 73 int i Integer parseInt n get toString if i gt 0 node add more else if indicatorType 1 Boolean b new Boolean n get toString if b booleanValue node add more else node add more catch NamingException _ex node add more public int compare LDAPURL srcUrl LDAPURL dstUrl if srcUrl sameHosts dstUrl return 0 Name src parse srcUrl getDN Name dst parse dstUrl getDN if dst compareTo src 0 return 1 if dst startsWith src return 2 Name prefix src getPrefix src size 1 return dst compareTo prefix 0 O 3 public DirContext connect LDAPURL url String base url get
111. ursob factor ej host domain com Para configurar el dispositivo de red seleccione el dispositivo y pulse en Modificar En la pantalla de Configuraci n miscel nea Modificar la interf Puerta de enlance 10 0 0 200 odificar la ii podr ma y Y lt Ri menaz po dy DNS Primaria 10 0 0 20a escogertener informaci n de IP y m scara de red DNS Secundario configurada por DHCP o DNS Terciario puede introducirlo de forma manual Puede escoger tambi n que el dispositivo est activo en el momento del Esconder Ayuda Notas de ditima hora do Anterior D Siguiente Gr fico 14 Configuraci n de Red Seleccionar el uso horario Seleccione la casilla El sistema horario usar UTC que significa que el reloj del sistema utilizar UTC Tiempo Universal Coordinado que es el sucesor de GMT b gt Greenwich Mean Time que significa Tiempo Promedio de Greenwich y es la zona horaria de referencia respecto a la cual se calculan todas las otras zonas del mundo Haga clic con el rat n sobre la regi n que corresponda en el mapa mundial o seleccione en el siguiente campo la zona horaria 124 que corresponda a la regi n donde se hospedar f sicamente el sistema Gr fico 15 Ayuda en l nea Selecci n del huso horano 7 2 Localizaci n Compensaci n ure Selecci n del huso horario Observe las dos pesta as que aparecen en lo alto de la pantalla La primera ofrece la posibilidad de co
Download Pdf Manuals
Related Search
Related Contents
Descargar manual en PDF Cables Direct IEEE-120 firewire cable NuClient User Manual - Surveillance System, Security Cameras Sonorous Surefix 523 Copyright © All rights reserved.
Failed to retrieve file