Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationMake an AD account a SuperUser?Make an AD account a SuperUser?
Previous
 
Next
New Post
12/15/2005 2:16 PM
 
Just as the subject says, how can you make an AD account a SuperUser?  I'm using DNN4.0.1
 
New Post
12/21/2005 8:38 AM
 
i have tried it also but it isn't an out of the box option, so I used a workaround:

run this SQL script and adjust the values:

DECLARE @Username nvarchar(256), @UserID as int, @aspnetUserID uniqueidentifier, @PortalID as int, @ApplicationID uniqueidentifier

 

--enter the userid here

SET @UserID = 4

--enter the portalid here

SET @PortalID = 0

 

SELECT @ApplicationID = ApplicationID

FROM aspnet_Applications

WHERE ApplicationName = '-1'

 

SELECT @Username = Username

FROM Users

WHERE UserID = @UserID

 
 Ok, I wrote the SQL to convert a user to a SuperUser.  You need to run this in SQL Query Analyzer...there are two parameters you need to specify (UserID and PortalID).  Backup your database before trying this, and try it in a dev environment first.  I have tried this locally and it does the trick.
---------------


SELECT @aspnetUserID = U.UserID

FROM aspnet_Users U

INNER JOIN aspnet_Applications A

ON U.ApplicationId = A.ApplicationId

WHERE U.Username = @Username

AND A.ApplicationName = convert(nvarchar(256), @PortalID)

 

UPDATE aspnet_Membership

SET ApplicationID = @ApplicationID

WHERE UserId = @aspnetUserID

 

 

UPDATE aspnet_Users

SET ApplicationID = @ApplicationID

WHERE UserId = @aspnetUserID

 

UPDATE Users

SET IsSuperUser = 1

WHERE UserID = @UserID
 
New Post
12/28/2005 3:00 PM
 

phenomenal...I just tried this on a 4.0.2 fresh install and it works perfectly.  Thanks for taking the time to figure this out and then posting it.

SQL newbies will want to make sure to take the free text out of the top and middle of your post before running it.  Also, the UserID can be found in the Users table in the DotNetNuke database.

 
New Post
1/4/2006 7:16 AM
 

WOW! Thanks - just tried it to my 3.2 install. Worked first time.
Now all I have to do is figure out how I can enable AD users to logout ... 

Chris

 

 
New Post
1/9/2006 10:18 AM
 

Just click logout to logout.  From there, you will need to go to http://your-portal/admin/security/windowssignin.aspx to log back in via AD.

One little caveat with the above script: if you use the objectQualifier in the web.config, you must prefix the two references to the Users. E.g. I used "dnn", so I changed it to

SELECT @Username = Username
FROM dnn_Users
WHERE UserID = @UserID

When I ran the script with the above tweak, the user name is blank when in Super User mode.  Before going running the script, the AD first name was shown.  Does anyone know to fix this?

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationMake an AD account a SuperUser?Make an AD account a SuperUser?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out