forum-informatico
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Ajude a Asast
Patrocinadores
Últimos assuntos
» Artigo ethereum
Procura no Active Directory com Ruby/LDAP EmptyTer Set 24, 2019 1:16 pm por jpmartins

» Artigo Bitcoin
Procura no Active Directory com Ruby/LDAP EmptyTer Set 24, 2019 1:13 pm por jpmartins

» Novo site para desportistas / New site for athletes
Procura no Active Directory com Ruby/LDAP EmptyTer Dez 04, 2018 8:19 am por Admin

» Check used port with the command line
Procura no Active Directory com Ruby/LDAP EmptyTer Dez 04, 2018 8:10 am por Admin

» Check the port where mariaDB is running
Procura no Active Directory com Ruby/LDAP EmptySeg Dez 03, 2018 4:59 am por Admin

» Check the linux version
Procura no Active Directory com Ruby/LDAP EmptySeg Dez 03, 2018 3:12 am por Admin

» Granting rights to a database for a user
Procura no Active Directory com Ruby/LDAP EmptyQui Nov 29, 2018 2:04 am por Admin

» Create new user
Procura no Active Directory com Ruby/LDAP EmptyQui Nov 29, 2018 2:01 am por Admin

» Change level of password security level
Procura no Active Directory com Ruby/LDAP EmptyQui Nov 29, 2018 1:59 am por Admin

AdSense
Contributo

Procura no Active Directory com Ruby/LDAP

Ir para baixo

Procura no Active Directory com Ruby/LDAP Empty Procura no Active Directory com Ruby/LDAP

Mensagem  Admin Qui Jun 12, 2008 1:40 am

Aqui fica um exemplo de como efectuar uma pesquisa e como obter informações acerca de um utilisador existente no Active Directory usando Ruby/LDAP:

login="xxx"
password="yyy"
connection = LDAP::Conn.new(@host, @port)
connection.set_option( LDAP::LDAP_OPT_PROTOCOL_VERSION, 3 )

connection.bind( email, password )

connection.search( @dn, LDAP::LDAP_SCOPE_SUBTREE, "sAMAccountName=#{login}") do |ad_user|
puts ad_user.vals("displayName").to_s
puts ad_user.vals("displayName").to_s
puts ad_user.vals("memberOf").to_s
end
Admin
Admin
Admin

Mensagens : 607
Data de inscrição : 21/01/2008
Idade : 46

https://forum-informatico.forumeiros.com

Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos