Need to regain access to my sites after domain migration.

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
12/9/2008 2:40:37 PM
Gravatar
Total Posts 5

Need to regain access to my sites after domain migration.

We have 2 mojo sites we use at work, and the old IT guy was let go a few months back, so now it's just me.. We locked down the login pages for our mojo sites, and since then have migrated all servers, etc to a new domain..

At first, we placed windows authentication on the secure/login.aspx page so that only valid domain accounts could even get to the login page. This no longer allowed anyone to log back on even after going through the windows authentication. I was fine with this for the time being, but now we need to update content, etc.. I removed the windows authentication from the login.aspx file security settings. I am using Windows Server 2003 and IIS. The DB is a SQL 2005 DB. Do i need to do anything regarding the databases and accounts

Now, I can see the passwords in clear text in the user table, and can confirm the usernames, and also that the account is not locked.. When I try to log in, I cannot. I just get login failed on the login page. if I screw up on purpose the account will lock out and that error message is displayed. I can manually change the value for IsLocked back to false, and try again, but get nowhere.

When I looked into the web.config file for the sql connection string, it was the original entry listed there. In user.config, I see:

<add key="MSSQLConnectionString" value="Data Source=(local);Initial Catalog=web;Integrated Security=True"/>

I assume this overrides the web.config entry which is default.

For the site itself we are using standard accounts, not email addresses. I am not using the AD integrated authentication abilities of mojo. The site will display properly and can be viewed. it cannot be loged into. My currentlog.config is not logging anything or being recreated after I renamed the existing one.

I am still new to mojo, and would love to continue using it. Any help would be greatly appreciated!!

12/10/2008 4:26:15 AM
Gravatar
Total Posts 18439

Re: Need to regain access to my sites after domain migration.

Hi,

If the passwords are in clear text, I would look in the mp_Sites table and make sure the password format is set to 0 (which indicates plain text)

If that doesn't solve it, please provide more info.

Is this a public facing site on the internet or on a local network/intranet?

What do you mean specifically by "we placed windows authentication on the secure/login.aspx page so that only valid domain accounts could even get to the login page"? You set file permissions? did something in IIS?

Windows authentication doesn't work over the internet. On a local network where the web server is part of a local domain you could change the web.config to use Windows authentication instead of Forms authentication.

For a public facing site you should use the default Forms authentication. For that to work, in IIS, on the security tab, you want to enable anonymous and integrated windows and disable anything else like basic or digest authentication. The anonymous just means IIS will let the .NET code handle authentication.

Hope it helps,

Joe

12/10/2008 12:00:43 PM
Gravatar
Total Posts 5

Re: Need to regain access to my sites after domain migration.

I checked and the password format is set to 0 in the mp_sites table.

The site is a public facing site on the internet.

By "placed windows authentication.." I meant in IIS we went to the directory security tab as you have mentioned, and selected to add basic authentication i believe. This would cause the user to get prompted for windows authentication when they clicked the sign in link on the site.

From IIS, I selected the entire site and changed the directory security (within IIS) to allow anonymous access and to use integrated windows authentication. I have no other boxes checked. Digest was selected, but I removed that setting, and I also chose the option to overrride the subdirectories when prompted.

As for file permissions (NTFS), I believe I have them set correctly based off what I saw in the installation instructions on this site. I added the aspnet, IIS_WPG, and network service account as read acces in the ntfs permissions for the site directory. I have given write access to the data folder for these accounts as well. I have also forced the permissions to apply to child objects, etc..

I can enter the username and password I have.. and just still get login failed. Then the account locks out. I know I am entering the password correctly. I have reentered it manually into the database once to set it, and other times i copy it from the DB itself. Also, The same thing happens with another account I have been trying with. That one I have not touched within the database, other than changing the islocked value to false.

Is there some kind of database user or something I may be missing here? The site and database were created on an old domain which no longer exists, so some of the sql db users may be invalid? Also the currentlog.config file recreated itself and there are no errors in it. Teh contents are below:

2008-12-09 16:35:40,255 [14844] INFO mojoPortal.Web.Global [(null)] - Global.asax.cs Application_End
2008-12-09 18:20:41,581 [12732] INFO mojoPortal.Web.Global [(null)] - Application Started.
2008-12-09 18:41:04,316 [14356] INFO mojoPortal.Web.Global [(null)] - Global.asax.cs Application_End
2008-12-10 12:33:13,123 [12352] INFO mojoPortal.Web.Global [(null)] - Application Started.
2008-12-10 12:40:41,723 [12352] INFO mojoPortal.Web.Global [(null)] - Global.asax.cs Application_End
2008-12-10 12:42:36,429 [12352] INFO mojoPortal.Web.Global [(null)] - Application Started.
 

I appreciate your help SO much!

Thanks.

12/10/2008 12:16:10 PM
Gravatar
Total Posts 18439

Re: Need to regain access to my sites after domain migration.

So you're still getting the same result after removing basic authentication?

I would check that UseLdapAuth is false or 0 in mp_Sites

I would make sure you have forms authentication configured in Web.config:

<authentication mode="Forms">
<forms name=".mojochangeme" protection="All" timeout="50000000" path="/" cookieless="UseCookies" />
</authentication>

<anonymousIdentification enabled="false" cookieName=".ASPXANONYMOUS" cookieTimeout="43200" cookieSlidingExpiration="true" cookieless="UseCookies" cookieProtection="All" />

If the domain is now different I would check in the mp_Hosts table. For single site installation this may be empty and thats ok. If you see incorrect host names there change to the correct ones.

If the password is long, I would try making it shorter because I remember a bug in an older version where the password parameter in the sql proc was declared shorter than the field length which would cause it to get truncated and login would fail.

Do you know what version of mojoPortal you have? You can look in the mp_SchemaVersion table for mojoportal-core.

Hope it helps,

Joe

 

 

12/10/2008 1:15:06 PM
Gravatar
Total Posts 5

Re: Need to regain access to my sites after domain migration.

Yes, the result was the same after removing the basic authentication.

Getting closer tho!!! I was just able to login, but only using the email login admin@admin.com. If I enter a regular username, it gives the error message that I have not entered a valid email address. But the admin@admin.com got me in and I can edit content on this site now. I just changed the setting to allow password changes and to not use email for login, so i am now working over here!!

UseLdapAuth was set to true, which I changed to false. There is info for the rest of the fields like server, etc.., but when I tried to change them from within the mojo site setup, I was redirected to an html error page when trying to save changes. Should I just remove these entries manually from the DB? I recieved the same error when trying to update my account info.

The error page read:

"We're sorry but a server error has occurred while trying to process your request.
The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page."

In web.config, the forms authentication info is there.. There, but in the code there, my line matches your except after path="/" I do not have the cookieless="UseCookies" portion. Should i add it?

The section: <anonymousIdentification enabled=.. is identical to what I have in my web.config.

I do not see the MP_Hosts table in the DB at all.

My mojo version is 2.2.4.6.

Thank you so much for your help!!

12/11/2008 5:50:06 AM
Gravatar
Total Posts 18439

Re: Need to regain access to my sites after domain migration.

Glad you got it working. So it was configured to use LDAP before and thats why the login was failing.

The generic error message is just to prevent giving hackers any clues. You can always see the real error message in currentlog.config or now that you can login, you can view the log under Administration Menu > System Log.

My bad, I meant mp_SiteHosts not mp_Hosts.

Best,

Joe

12/11/2008 10:58:27 AM
Gravatar
Total Posts 5

Re: Need to regain access to my sites after domain migration.

Awesome!

Thank you so much again for your help!!

2/1/2009 6:10:00 PM
Gravatar
Total Posts 1

Re: Need to regain access to my sites after domain migration.

Hi, I don't find currentlog.config file in the root folder. So where can I see the error now?

Thanks

2/1/2009 6:53:31 PM
Gravatar
Total Posts 18439

Re: Need to regain access to my sites after domain migration.

The log is at /Data/currentlog.config

Its also viewable from the web UI at (key icon) Administration Menu > System Log

Newest errors are at teh bottom of the file.

Hope it helps,

Joe

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