LDAP setup

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
10/11/2006 5:42:10 AM
Gravatar
Total Posts 3

Re: LDAP setup

I have my site setup and going. It is on a server that I have complete control of. It is a Windows 2003 server.

I am trying to setup LDAP.

Can the URL have information like ldap://ldapserver.com/OU=XX,OU=CITY ?

Port is OK.

Is the RootDN the same as the BindDN? Also our LDAP has a BindPassword. How do I enter this?

Finally, after this is going I need to limit to select users by name and department. Is there syntax that I can place in the URL? This is how I have done it with Apache using LDAP to secure pages.

Thanks

Ed

10/11/2006 6:07:26 AM
Gravatar
Total Posts 18439

Re: LDAP setup

Hi Ed,

I'll try to help you as best I can with my limited understanding of LDAP. I've tested using Active Directory and using OpenLDAP but not using any other LDAP servers and my testing was a good while back so I'm working from memory.

Are you using AD or OpenLDAP or soemthing else?

The first thing you need to do is a create a user (still using db authentication) with a user id corresponding to the LDAP login name and make this use an admin user. For example if my LDAP login is jaudette then I create a mojoportal user with the user id jaudette and add it to the adminitrators role in mojoportal.

Next login as this user in order to make the cahnge to LDAP authentication. You will need to enter your LDAP password but it won't be stored in the db, it will just be used to authenticate against LDAP and the site won't let you change to LDAP authentication until this is successful to prevent you saving incorrect settings and getting locked out.

You enter only the hostname not the url, so if your url is as you specified, then just enter ldapserver.com not the whole url.

The RootDN setting is the container that has the users you want to be able to authenticate. There are some examples if you click the help icon next to the RootDN setting. I think you would enter you ou=xx,ou=city,ou=dept or whatever identifies the group of users who should be able to login.

I'm not sure about the LDAP bind password, are you saying the user can't authenticate against ldap without their own username and password plus an additional bind password? For security reasons I have avoided persisting any ldap passwords in the db. The current implementation is built strictly to authenticate against LDAP not for any management of LDAP. A corresponding database user is created for any user that authenticates, roles within the site are still determined within the db not using any LDAP roles.

Hope it helps,

Joe
10/11/2006 6:41:23 AM
Gravatar
Total Posts 3

Re: LDAP setup

Hi Joe.

Thanks for the fast reply.

We are using AD for LDAP.

I created a new user with my LDAP ID and gave myself ADMIN rights in mojoportal.

The URL and ROOTDN make sense so I can enter that.

In order to even read our LDAP we have to use a BindDN (which happens to be different from my container I need to check for my user and departments). This BindDn also requires a read password.

One last question. For the RootDN, when I enter the container, can I also use filters?

For example:

OU=INFO,OU=CITY,OU=MYDEPT,DC=MYCOMPANY,DC=com?ouraccountname??(|(departmentName=dept1) (ouraccountname=user1)(ouraccountname=user2)(ouraccountname=user3))

The default object from the LDAP container is not the ouraccountname. ouraccountname is the userid we use for AD. The syntax above would allow anyone from dept1 that enters their userid and password correctly to authenicate. It would also allow user1, user2 or user3 to authenicate regardless of their departmentName setting.

Ed

10/11/2006 7:10:32 AM
Gravatar
Total Posts 18439

Re: LDAP setup

I'm not sure about the filters for the RootDN, I guess try and see. I think one problem will be that the field is only 255 chars in the db so the filters couldn't be as long as your example.

I'm certainly open to changing this to a ntext field and adding fields for the BindDN info, just not sure when I could get to it myself.

Are you a developer? Would you be interested in trying to modify the implementation to meet your needs? I'd be glad to integrate it back into the project if you send your changes. I would also take care of implementing the changes for the other data layers since I'm assuming you are using MS SQL.

Alternatively, if your company would like to sponsor development to enhance this to meet your needs. I could work out a good rate for you and I could start in early November. I think it would only take me 2-3 days but I'd have to get feedback during that process since I wouldn't be working against the same AD setup.

Thanks,

Joe
10/11/2006 9:56:26 AM
Gravatar
Total Posts 3

Re: LDAP setup

I am a developer but new to .NET and I have not done ASP in 5 years or so.

I have to have something going by the end of this week. I think for now I will just control the users and fix the LDAP later. When I get it done I will contact you so you can use it if you like.

I have to start configuring my content and I have to build a module to access a MS SQL database and allow data entry. Next week I have to being able to produce a report from the database. I figure I can find some examples.

Thanks for your help.

BTW, I also installed DOTNETNUKE. It looks good but it seems very very slow to me. I am going to stick with your mojoportal. Also, your code is C# which is what I want to learn next. VB is old news.

:)

Ed  

10/11/2006 11:17:34 AM
Gravatar
Total Posts 18439

Re: LDAP setup

Sounds good. let me know if you run into any issues and I'll try and help.

I also found DNN to be much slower and to consume much more server resources than mojoportal in my load testing.

Glad more and more people are starting to find out about mojoPortal. Would love to have even half the popularity DNN has.

Cheers,

Joe
10/20/2006 1:23:44 PM
Gravatar
Total Posts 1

Re: LDAP setup

I believe I have solved the Active Directory Authentication issues (with a MS-SQL Server installation). 
I hope to have the code to you by monday.

 

Greg

10/20/2006 2:02:01 PM
Gravatar
Total Posts 18439

Re: LDAP setup

Hi Greg,

Thanks for the help! If you get your changes in early next week I'll try and do the other data layers and get it into svn the following weekend.

Many Thanks,

Joe
7/24/2008 6:35:11 AM
Gravatar
Total Posts 68

Re: LDAP setup

Hi Ed,

I was looking for posts on LDAP and came across yours so I am posting this question so maybe you have by now enough knowledge to help me.

I have setup MojoPortal using LDAP and SQL server and it works fine for users on the local domain. But there are users who are not on the local domain here, i.e. They have domain accounts but there accounts are stored on several other servers around the world and our LDAP server here does not sync with them.

How can I add parameters in Mojo's LDAP section to allow users from other domain to get authenticated?

They say they can see the page which I have enabled Anonynmous access on but when they login they get the usual "Login Failed" message. This is because mojo cant authenticate them using the Forms Authentication to the servers where their domain accounts are stored.

The setting for Root DN for User Authentication: CN=Users,DC=my,DC=company,DC=ORG

For example, locally users from DOMAIN1 can access the portal and login, but how do I allow all users from DOMAIN2, DOMAIN3, DOMAIN4 to gain access and login?

Actually MyDomain belongs to a larger forest of domains so could I even allow users from ROOTDOMAIN (which hosts DOMAIN1,2,3,4) to login instead?

Eagerly awaiting your response.

Dominique

You must sign in to post in the forums. This thread is closed to new posts.