F
fu
Hi,
Does someone have a few guidelines for the following:
- Get the information about the user currently logged in (at least
username would be good),
- Use the above information to query the Active Directory (can net/
ldap or ruby/ldap be used for this successfully?) for other info,
specifically group membership?
I am on WinXP, but any guidelines might help (e.g. getting username on
*nix or querying LDAP on Mac). An important thing is that, from the
examples I have seen (e.g. a good one with Rails on top -
http://wiki.rubyonrails.org/rails/pages/HowtoAuthenticateViaLdap), you
need a few things to query AD - the login name, the password (a no-no
for storing within the script), base dn and other stuff.
All of these can change if you change the access place, so a good way
would be to fetch everything at runtime. I know that all of these can
be found in the information Windows can provide for the current user,
because various vbs scripts can do this (e.g.
http://www.computerperformance.co.uk/ezine/ezine138.htm). Can
something similar be done in Ruby easily (as tons of other stuff can)?
Does someone have a few guidelines for the following:
- Get the information about the user currently logged in (at least
username would be good),
- Use the above information to query the Active Directory (can net/
ldap or ruby/ldap be used for this successfully?) for other info,
specifically group membership?
I am on WinXP, but any guidelines might help (e.g. getting username on
*nix or querying LDAP on Mac). An important thing is that, from the
examples I have seen (e.g. a good one with Rails on top -
http://wiki.rubyonrails.org/rails/pages/HowtoAuthenticateViaLdap), you
need a few things to query AD - the login name, the password (a no-no
for storing within the script), base dn and other stuff.
All of these can change if you change the access place, so a good way
would be to fetch everything at runtime. I know that all of these can
be found in the information Windows can provide for the current user,
because various vbs scripts can do this (e.g.
http://www.computerperformance.co.uk/ezine/ezine138.htm). Can
something similar be done in Ruby easily (as tons of other stuff can)?