Search
  
 
Mitchel Sellers' DotNetNuke, .NET, and Other Topics BlogMinimize
 
 
Subscribe To Blog Updates by E-Mail

Current Articles | Categories | Search | Syndication

   
 Promoting DNN User to Super user
By Mitchel Sellers on Saturday, February 24, 2007 @ 1:00 AM
 
  445 Views :: 4 Comments :: :: DotNetNuke, Tutorials, SQL
  
 

As someone pointed out on the DotNetNuke message boards, my previous example of creating a new host account via SQL is a bit over-involved in certain special cases. If you have an user account that you would simply like to promote to a host account it is a very simple single SQL Script. This process can be very helpful if you are looking to take for example your personal account and promote it to a host to fix errors. However, you want to be sure that you are careful which account you promote as anyone that would log in with this account after the change will have host permissions!

The Script

To update the user account simply run the below script, be sure to put your username in for the username.

UPDATE users
SET IsSuperUser 1
WHERE username 'TestUser'
 
  
 Share/Save This Article 
 

Use the below controls to save this article to one of many popular social bookmarking sites!

   kick it on DotNetKicks.com  
 
  
 Article Rating 
  
  
 Article Comments 
 
By H @ Monday, December 10, 2007 6:49 AM
Thanks for this.

Although I'm not sure this is quite enough to get the user to full superuser status.

When I applied this to a user account they still remained listed in the portal user list rather than in the superuser list - so they can still be deleted by portal admins...

To fix this (looking at the source for DotNetNuke.Modules.Admin.Users.UserAccounts) I think you'd need to delete the relevant userId from the PortalUsers table - but I've not tried this yet!

By Mitchel Sellers @ Monday, December 10, 2007 3:51 PM
Yes, you are correct!

By Dean Craft @ Wednesday, April 09, 2008 3:49 AM
I am honestly surprised that DNN doesn't allow you to assign this role if you are a host user. It could spell trouble for those not adapt at SQL like myself. Unles there is a way to give module upload access to an admin?

By Mitchel Sellers @ Wednesday, April 09, 2008 3:58 AM
Dean,

I would agree to a certain extent....but the permissions granted with host access are so great, that in my opinion it should be external to normal roles.

You can create a new Host user easily via the "Host Accounts" menu options.

Click here to post a comment
 

 Add to Technorati Favorites
 Print   
 
  
 
ArchiveMinimize
 
 
 Print   
 
  
 
CategoriesMinimize
 
 
 Print   
 
  
 
DonateMinimize
 
 

Show your appreciation for the content/modules made available by MitchelSellers.com by making a donation. Donations are used to assist with dedicating time to creating free content. 

 Print