Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Non AD to AD upgrade strategy.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Non AD to AD upgrade strategy.

 Post Reply Post Reply Page  123>
Author
p3ter View Drop Down
Newbie
Newbie


Joined: 06 July 2004
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote p3ter Quote  Post ReplyReply Direct Link To This Post Topic: Non AD to AD upgrade strategy.
    Posted: 28 April 2008 at 10:47am
Hi,
 
I'm planning to upgrade our Intranet forum from 7.7a to 9.08, and have installed a test version from a MS SQL database backup.
 
The site seems to be working fine with AD integration, but I have an issue with already existing users:
 
In v7 we have been very clear that we wanted users to sign up using the exact same name as their AD username, and most, but not all, users have followed this instruction.
 
Now, for every user that already exists and tries to login, they will get "an error has occurred while writing to the database" Server Error:
Server Error in Forum Application
An error has occurred while writing to the database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_windowsAuthentication()_add_new_user
File Name:- functions_windows_authentication.asp

Error details:-
Microsoft OLE DB Provider for SQL Server
Cannot insert duplicate key row in object 'dbo.tblAuthor' with unique index 'Username'.
 
So... is there a way to allow a 1:1 match on member name automatically to automatically log the user in as that member? (i.e. upgrade an existing member to an AD user automatically) Otherwise, I have a massive job ahead of me to manually try to link these people back to their 'old' non-AD users.
 
For the rest - maybe 100 or so users have created different usernames, either because they have a hard time following instructions, or because were forced to do so since the Username field was limited to 20 characters, and their names were longer.
 
Of these around 100, there are maybe 30 current & active users where I will need to manually convert their old username into a new AD user. Can anyone tell me how to do this?
 
Finally, I notice that the Email address field doesn't automatically get populated from AD - is there a way to rectify this?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2008 at 11:11am
To use the AD integration you would normally need to start with a clean install but as most of your members have used their AD username you may be OK.

For those that get errors what you would need to do is edit their account from the admin area and set their username to the exact same the as username they use for AD. If you can not edit their username from the admin area as it may be disabled when using AD integration it would be a case of editing the tblAuthor table in the database manually.

ASP is limited in the information it can get when AD integration is enabled, the only information available is the Windows login they use to browse the website, so email addresses are not available.

If you have a look though the old version 8 forums I do recall a few years back someone posting something which I beleive used a WSH script to be able to get the email address from AD accounts.
Back to Top
p3ter View Drop Down
Newbie
Newbie


Joined: 06 July 2004
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote p3ter Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2008 at 3:47pm
The problem (& the error message) I am getting is when "Existing name = Active Directory Name"
 
This does not link the old user to the new AD login as expected. It looks like it's the 'User_ Code' field that determines if the user is unique, and for all existing users, this appears to have a random number tagged onto the end of it,
 
i.e.
 
Existing v7.7a local users:
Username field = 'Firstname Lastname'
User_Code field  = 'Firstname LastnameZ55EE637EA'
 
New v9.08 AD Users:
Username field = 'Firstname Lastname'
User_Code field  = 'DOMAIN\Firstname Lastname'
 
So even though the usernames are identical, the difference in the User_Code field stops the AD user from ever being connected back to their 'old' user.
 
So... what are these numbers, and what is the impact of deleting them? Most are 10 characters, but some are up to 15...
 
It looks like it will be hard to do any kind of automatic search & replace on the User_Code field alone, since the number of 'random' characters is variable, so assuming I can export the table to Excel I could maybe replace the User_Code field with '=Concatenate("DOMAIN\",C1)' or similar, but I would like to know the risk first. 
 
 
And another thing ;)...
 
When I try to update a new AD user's Email address, I get the error
Error Error
Only members with sufficient permission can access this page.

A security error has occurred with authentication.

Please ensure that all cookies are enabled on your web browser, you are not using a saved or cached copy of the page, and your Firewall/Proxy settings are not hiding or masking your IP address.
- is this another limitation of AD users?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2008 at 4:05pm
I knew there was a reason that it says in the setup file for this it must be done on a clean install and that is it.

I'm afraid you would need to manually update every single user in the database or start again with a clean install.

There well maybe other issues you find as well why you can not switch over to using the AD integration. I think you may find that you would need to stick with your previous method or start again.
Back to Top
p3ter View Drop Down
Newbie
Newbie


Joined: 06 July 2004
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote p3ter Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2008 at 4:26pm
Thanks for the confirmation Bruce.
 
I would be glad to hear from anyone who has succeeded in doing this upgrade - from my perspective it doesn't look so risky to export the Author table, replace the text in the 'User_Code' field to be ("DOMAIN\" + "Username") and reimport.

I have done this successfully for one user, and all user related functionality tested so far sems to work OK.
 
Bruce, I did see Jono's mod, but since we will be registering this if we get it running, I tend towards not wanting to change anything. So what whould your position be on supporting a 'modded' registered forum?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2008 at 5:03pm
It should work by making the change you mention but depending on the number of members it may take some time.

3rd Party Mods are not officially supported as without studying and testing each one it's hard to give support for them. However, if you are happy to go it alone with any issues with the mod and test it out yourself you should be fine. All the mod is doing is getting the email address anyway so shouldn't course to many issues.
Back to Top
Jono View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 18 September 2006
Location: United Kingdom
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jono Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2008 at 5:53pm
If you are feeling really brave, you could execute this script against the WebWizForums database (after making a backup, or better still on a test system):
 
UPDATE tblAuthor SET User_code='DOMAIN\'+Username WHERE Author_ID NOT IN (1,2)
 
Replace DOMAIN with your NetBIOS domain name. It will exclude records 1 and 2 as these are the Admin and Guest accounts. This assumes that your users have registered with there AD logon names.
 
You could then export the User_Code to check againist AD and identify if they do not match up - i.e. they haven't used their logon name, or they have left the company. You may be able to utilise some of the functions in the vbScript file included with my AD MOD for this.
 
Let us know how you get on.
Back to Top
Jono View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 18 September 2006
Location: United Kingdom
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jono Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2008 at 11:51am
And here's a vbScript to identify any records that are not in your domain after running the SQL statement above.
 
 
Edit the vbScript and enter your database connection details at the top. Then type:
cscript //nologo CheckWebWizAgainstNT.vbs > Errors.txt
at a command prompt. It will give a tab delimited output (import in to Excel). Ignore the Administrator and guest accounts, the rest you'll have to fix manually.
 
Hope this helps,
 
Jono
Back to Top
 Post Reply Post Reply Page  123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.