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
 Problems to get fullname / windows authentication
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

eelcomid
Starting Member

2 Posts

Posted - 25 January 2005 :  05:24:30  Show Profile
Hello,

I have a problem to get the fullname of a user if I use windows authentication. I use this code:
======================================================================
if strAutoLogon="1" then
strNTUserFullName = Session(strCookieURL & "strNTUserFullName")
if Session(strCookieURL & "strNTUserFullName") = "" then
Set strNTUserInfo = GetObject("WinNT://"+strNTUser)
strNTUserFullName=strNTUserInfo.FullName
Session(strCookieURL & "strNTUserFullName") = strNTUserFullName
end if
end if
======================================================================

Then I get this: error '80070035'
/inc_func_common.asp, line 820

line 820 is: Set strNTUserInfo = GetObject("WinNT://"+strNTUser)

Is there anyone knows what the problem is?
Thank you.

Eelco Middelburg

gmcdonald
Starting Member

12 Posts

Posted - 25 January 2005 :  09:28:02  Show Profile
I have exactly the same problem and have just found out that my Network people have just upgraded to Active Directory. I'm still trying to find a solution to this problem. Meantime my forum is totally broken Might be worth checking if this is the same for you.
Go to Top of Page

eelcomid
Starting Member

2 Posts

Posted - 25 January 2005 :  12:57:27  Show Profile
We also use active dir. I still didn't find a solution. Please tell me if you find a what to do, I will do the same.
Go to Top of Page

gmcdonald
Starting Member

12 Posts

Posted - 11 February 2005 :  05:35:00  Show Profile
I have a solution!!!! (Well one of my guru developers did it but I'll take the credit )

Find out the name of your LDAP server and RootDSE:

================================================
Dim rootDSE

Set rootDSE = GetObject("LDAP://ldapservername/rootDSE")
================================================
Then replace the lines:

================================================
Set strNTUserInfo = GetObject("WinNT://"+strNTUser)

strNTUserFullName=strNTUserInfo.FullName

WITH

Set strNTUserInfo = GetObject("LDAP://ldapservername/RootDSE")
strNTUserFullName=strNTUserInfo.name
================================================

My Forum is now working again!! Please let me know if this solves your problem.

Cheers,
Graeme


Edited by - gmcdonald on 11 February 2005 05:36:01
Go to Top of Page

roryniland
Starting Member

8 Posts

Posted - 03 June 2005 :  04:53:50  Show Profile
This works perfectly as long as your are not using NT groups ..

If you are the syntax of the query for groups fails .. I had to turn off NT groups because I'm unsure of the syntax change ...

This account was hacked into by Image, a very honest guy as you all can see! Stealing people' s passwords IS his pasttime.
Go to Top of Page

roryniland
Starting Member

8 Posts

Posted - 10 June 2005 :  05:06:39  Show Profile
We are getting RootDSE as the users full name now ??

This account was hacked into by Image, a very honest guy as you all can see! Stealing people' s passwords IS his pasttime.
Go to Top of Page

leon summers
Starting Member

1 Posts

Posted - 12 July 2005 :  04:01:07  Show Profile
try this.

replace this
'Set strNTUserInfo = GetObject("WinNT://"+strNTUser)
'strNTUserFullName=strNTUserInfo.FullName
with this
strNTUserFullName = mid(request.ServerVariables("AUTH_USER"),5)
that will give you the full username of the auth_user on the webpage if on an intranet.

The ,5 is to remove the domain name from the user account ie domain\username. so just change the number to correspond to the length of the domain name +1 for the \.
Go to Top of Page

Gang_Warily
Starting Member

5 Posts

Posted - 13 September 2005 :  09:01:49  Show Profile
Graeme
Can you please post the correct code to replace winnt: with ldap: ?

Above, you create an object "rootDSE" that is not used again.
Then you haven't specified which user's info to LDAP query .
Shouldn't "strNTUser" be in there somewhere ?

Sorry to be picky !
Go to Top of Page

lduvall
Starting Member

8 Posts

Posted - 02 August 2006 :  12:33:19  Show Profile
Can someone tell me where I should put that code that you suggested above to use NT and Group Authentication? We're running Windows 2003 servers with Snitz Forum and we are desperately trying to use NT Authentication (and Group as well). I see that someone has posted code for the two situations. I simply don't know enough about web development to know where to put that code! Your help would be greatly appreciated.

Bump...

Bump bump... seriously, no one cares about this??

Edited by - lduvall on 04 September 2006 16:11:41
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 05 September 2006 :  06:11:18  Show Profile  Visit AnonJr's Homepage
Its not that nobody cares, its that nobody who cares to help can help. The vast majority of the forums are run over the internet and use the DB authentication. Those few people who run it internally with an AD and such seem to figure it out and never come back. I'd love to help you out, but I have no clue....
Go to Top of Page

lduvall
Starting Member

8 Posts

Posted - 07 December 2006 :  17:01:18  Show Profile
I changed the code in inc_func_common.asp as was suggested above. I still cannot get NT Groups to work. Also, when it comes to NT Auto-logon: When I hit my site, I'm prompted for a username and password. When I put in my AD username & password (including the domain on my username), I get into my forum and it recognizes who I am. Is that considered NT Auto-logon? It shouldn't prompt me, should it? I'm one step further than before. Before, I didn't even get the prompt. Does anyone else have suggestions on the NT Group thing?

The only thing I can find that we have look at NT Groups is the election.asp page. I work for a college and we have elections where only students or only faculty can vote. Are there any other pages that come pre-packaged that use Group functionality that I should worry about?
Go to Top of Page

kingvandal
Starting Member

4 Posts

Posted - 31 May 2007 :  14:33:12  Show Profile
I did both changes and both worked but I still see RootDSE as th user and in replys it shows the user as RootDSE only. Nothing of the actual user name. Any ideas?
Go to Top of Page

p166mmx73
Starting Member

2 Posts

Posted - 12 July 2007 :  18:52:28  Show Profile
I had a need to support multiple AD domains so I modified the inc_func_common.asp file as follows:

REPLACE
'Set strNTUserInfo = GetObject("WinNT://"+strNTUser)
'strNTUserFullName=strNTUserInfo.FullName

WITH
strNTUserFullName = Mid(strNTUser,(instr(1,strNTUser,"/")+1),len(strNTUser))

This way I do not have to specify the amount of characters in the domain name.
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