Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Authentication: NT
 Help with NT autologin please
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

hoffmancorp
Starting Member

8 Posts

Posted - 08 May 2003 :  11:02:22  Show Profile
As many have posted before, I too am having issues with the NT login aspect of Snitz. I have a corporate intranet and just want to save all the employees the hassle of registering on the board. Nothing fancy, just get them in and allow them to post, etc.

Here is my problem and I am hoping someone can help.

Clean install of the board. Ran setup.asp and everything is fine. Went to the default page and it came up and was asking me to Login in the upper right. This is how the clean install is supposed to work - so far, so good.
Logged in as Admin and did not change a thing except for the Auth type - from db to nt. Next screen shows my NT login name (username). Still fine.
Go to another machine that is logged in as a regular domain user and connect to site. Screen comes up and has a "Please register to post..." on the upper right-hand corner. So, we have to got through the reg process, even though we are authenticating (hmmm..ok). register and it works fine.
Go back in as Admin and enable NTAUTOLOGIN - sounds like it should help with our problem, right? I did NOT enable NTGROUPS.
Go to another machine, connect to the site with a new user id, and WHAM! Error:
0x80040E07
Data Type Mismatch in criteria expression
/forum/register.asp line 569

I can reproduce this all day long when I have NT autologin enabled. Turn it off - the error goes away.

Turn on NT Groups - doesn't seem to have any effect on registration, posts, anything. (another hmmm)

I am running W2k SP3, IIS5, and an Access DB. I check the forum variables and my username, domain, etc all show up.

Does anyone have any ideas on this?

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 08 May 2003 :  11:25:47  Show Profile
try this:

http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=34873

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

hoffmancorp
Starting Member

8 Posts

Posted - 08 May 2003 :  13:04:09  Show Profile
Thanks Nikkol - it appears to have fixed it.

There is a way to pull the email address from a server variable from AD - I've just got to figure out what it is, assign it a variable in the forum and populate the email addres in the DB? Sound right?

Your the best.
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 08 May 2003 :  14:02:27  Show Profile
these are AD users versus NT users? if so, yes, you can grab the email. i'll dig up the code for you if this is the case.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

hoffmancorp
Starting Member

8 Posts

Posted - 09 May 2003 :  09:19:10  Show Profile
Yes - they are AD users. please post the code when you can. Much appreciated.

Gold star for Nikkol!

Edited by - hoffmancorp on 09 May 2003 13:38:05
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 09 May 2003 :  13:47:50  Show Profile
For AD you can use the following to get the email:
(just an example, you'll need to figure out what to actually put there based on your server)

set oUser = GetObject("LDAP://servername/cn=username,dc=companyname,dc=com")
strEmail = oUser.EmailAddress
set oUser = Nothing

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

hoffmancorp
Starting Member

8 Posts

Posted - 09 May 2003 :  16:10:50  Show Profile
Thanks Nikkol-
Sorry for not being the sharpest with Snitz, but can you tell me where I need to insert that code to make it all work?

Thanks much.
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 09 May 2003 :  16:32:17  Show Profile
i would assume somewhere in register.asp ... i don't use nt auth so i'm not really sure.

I can check later, just remind me.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~

Edited by - Nikkol on 09 May 2003 16:32:44
Go to Top of Page

hoffmancorp
Starting Member

8 Posts

Posted - 12 May 2003 :  07:44:41  Show Profile
Friendly reminder for Nikkol!

Thanks.
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 12 May 2003 :  08:36:31  Show Profile
Okay here goes.

In inc_profile.asp, line 73 looks like:
		if strMode <> "Register" then  Response.Write(rs("M_EMAIL"))

make it this:
		if strMode <> "Register" then  
			Response.Write(rs("M_EMAIL"))
		else
			set oUser = GetObject("LDAP://servername/cn=" & Session(strCookieURL & "userid") & ",dc=companyname,dc=com")
			strEmail = oUser.EmailAddress
			set oUser = Nothing
			Response.Write(rs("M_EMAIL"))
		end if
Be sure to replace servername and companyname for your server. An example would be this: say your doman name was sales.widgets.com, then the last part of that string would be ,dc=sales,dc=widgets,dc=com.

After that, find line 89 which looks like:
					"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Email3"" size=""25"" maxLength=""50"" value=""""></font></td>" & vbNewLine & _

Make it look like:
					"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Email3"" size=""25"" maxLength=""50"" value=""" & strEmail & """></font></td>" & vbNewLine & _

I can't be sure that will do it. Make a backup copy of inc_profile.asp before you start and tell me how it goes.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07