28 votes
Accepted

How to unlock the Sitecore admin user account?

If you have direct access to the database, you can run the following from SQL Management Studio: UPDATE aspnet_Membership SET IsLockedOut = 0, FailedPasswordAttemptCount = 0 WHERE ...
LonghornTaco's user avatar
  • 2,536
17 votes

How to unlock the Sitecore admin user account?

In addition to the answer above, if you have the misery of forgetting the Sitecore password then this will save you: UPDATE [aspnet_Membership] SET [Password]='qOvF8m8F2IcWMvfOBjJYHmfLABc=', [...
Steven Newstead's user avatar
12 votes

How to send email, when users roles change - User Manager customization

One option is to hook into Sitecore's user:updated event (and optionally user:updated:remote). This event is raised when a user has been updated, the remote event handler is raised when a user was ...
Thomas D's user avatar
  • 1,703
11 votes

How to unlock the Sitecore admin user account?

There is also an admin page: URL: http://www.yoursite.com/sitecore/admin/unlock_admin.aspx By default, it's disabled so you need to edit the aspx file to set enableUnlockButton to true.
sestocker's user avatar
  • 1,697
11 votes
Accepted

Can I hide disabled users in the User Manager?

I propose hiding users through the use of filtering in the membership provider. Consider using the customFilter attribute used by the Active Directory membership and role providers. Examples shown ...
Michael West's user avatar
  • 18.2k
10 votes
Accepted

Subscribing to EXM Email: How do you manage multiple contacts using the same computer?

This is a pretty complex issue and question, but you have broken it down excellently to allow me to attempt and pinpoint the issue. I believe the issue you are suffering from is what I have called "...
Pete Navarra's user avatar
  • 14.6k
10 votes
Accepted

How to add domain name of Programmatically added Users in Sitecore

As @Balaji Kuppuswamy stated in comments, you simply need to include the domain name into the full user name when creating a user: System.Web.Security.Membership.CreateUser(@"sitecore\myuser", "b", "...
Serhii Shushliapin's user avatar
10 votes
Accepted

Administrator access as a role

Yes, "admin" is not a role and cannot be assigned to a role. You shouldn't do that either. If you need that many admin users, there might be something fishy with your security requirements. You might ...
Gatogordo's user avatar
  • 20.1k
8 votes
Accepted

Run powershell script when new user is created

You could consider running a script that fires with the user:created event. Try the following: Step 1 Create a patch which tells SPE to run scripts for the Sitecore event. <configuration xmlns:...
Michael West's user avatar
  • 18.2k
7 votes

Getting User Roles from Username

To get a user by a username you can use : public class UserRepository { public static User GetUser(string domainName, string userName) { if (User.Exists(domainName + @"\" + userName)) ...
Vlad Iobagiu's user avatar
  • 18.5k
7 votes

Securing a page with item permissions without redirecting the user away

You will need to use component personalization for this. That means all users get access to the page, but on the personalization rules for components you set exceptions based on security. For example:...
Ruud van Falier's user avatar
7 votes
Accepted

Changing the "Invalid Password" message in User Manager

This message is a dictionary entry in the core database in Sitecore. Go to Sitecore Desktop, switch to core database and find the item: Path: /sitecore/system/Dictionary/F/Failed to set the ...
Marek Musielak's user avatar
  • 23.8k
7 votes
Accepted

Check if a user is disabled

You can get this info the other way around. Check the !user.IsApproved property. But first you need to get the user through the membership provider like this: var provider = System.Web.Security....
Tamás Tárnok's user avatar
6 votes
Accepted

How to set default wallpaper for virtual user?

The problem could be is that you are using the following: virtualUser.Profile.SetCustomProperty("Wallpaper", "/sitecore/shell/themes/backgrounds/Field.jpg") Try to use the following: virtualUser....
Tamás Tárnok's user avatar
6 votes

I packaged a bunch of roles but when seen in next environment, the security access and options did not translate in the next environment

Since you mention the use of TDS, you can manage the synchronization of all Roles and security on item using features available in TDS. This has the advantage that both Roles and the security becomes ...
jammykam's user avatar
  • 13.8k
5 votes
Accepted

How to remove admin role permissions programatically?

Here is the correct code: var user = Sitecore.Security.Accounts.User.FromName("sitecore\\test", true); RemoveRoles(user); protected void RemoveRoles(Sitecore.Security.Accounts.User user) { ...
Marek Musielak's user avatar
  • 23.8k
5 votes

Check if a user is disabled

I think Sitecore PowerShell Extensions could help address both the workflow action feature, as well as finding the users. The following query would provide enabled users in a given domain: Get-User -...
Michael West's user avatar
  • 18.2k
4 votes
Accepted

What Does the "Reset Settings" button in the User Manager do?

This code is execute when you click this button : [Serializable] public class ResetSettings : Command, ISupportsContinuation { /// <summary> /// Executes the command in the specified ...
Vlad Iobagiu's user avatar
  • 18.5k
4 votes

How to add domain name of Programmatically added Users in Sitecore

As the other suggested answers suggest is correct. When you are creating a new user programmatically, you can get the Full name by using the following code: string domainUser = Sitecore.Context....
Dylan Young's user avatar
  • 4,314
4 votes

Administrator access as a role

As @Gatogordo mentions, you likely shouldn't be using Administrator. This should be a checkbox you use on your 'emergency' account which you use to access things that nobody should access. Inheriting ...
Jason St-Cyr's user avatar
  • 6,781
4 votes

Create new user with JSS

It does not exist now. For that you would need an web API which also contains some backend validation to not blow up your user database. In backend you can easily create users using Sitecore API. At ...
Tamás Tárnok's user avatar
4 votes
Accepted

Restricting which roles a role can assign

You can't directly set permissions to restrict user to only be able to add certain roles. But you can use Sitecore local managed domain to sort of workaround this issue. Basically, you would have ...
Fredric Foo's user avatar
  • 1,000
3 votes

Virtual user custom properties missing on CD server

Virtual user information is saved in Session. By default Sitecore configuration doesn't share sessions information between few CD servers. That is why one CD server doesn't know anything about logged ...
Anton's user avatar
  • 3,821
3 votes
Accepted

Change password using generate button in User Manager

To make this work you need to follow these 5 steps: Create your own GeneratePassword() method.It should do exactly the same as System.Web.Security.SqlMembershipProvider.GeneratePassword(), but ...
Peter Procházka's user avatar
3 votes

Can we increase max size of the search box in usermanager?

User Manager uses /sitecore/layout/Layouts/Security/SecurityManager layout. Path to aspx page is /sitecore/shell/Applications/Security/UserManager/UserManager.aspx. Layout uses Grid component from ...
Andrei Paliakou's user avatar
3 votes
Accepted

How to Kick a Sitecore User Programmatically

After talking to the community and parsing the decompiled DLL I reached the conclusion that Sitecore Kick Method is only used to Free Sitecore License, not to Logout a Sitecore user from the session. ...
Jose Neto's user avatar
  • 1,015
3 votes
Accepted

How to perform a faster search on User list

There is, but none of the ways I know of will go via the standard API. The "problem" is; while the standard API will allow you to paginate through the user base, it will not allow you to ...
Mark Cassidy's user avatar
  • 25.2k
3 votes

Is there a way to add Sitecore admin into core database?

Insert a new user, sitecore\Admin. Then follow the instructions on this question to set the proper password. Is there a way to reset Sitecore admin password from database level? For Sitecore 9, you ...
Mark Cassidy's user avatar
  • 25.2k
3 votes

Is there a way to add Sitecore admin into core database?

Thanks @Mark Cassidy , We need to add one more row in db table "[aspnet_Profile]" Steps to create admin user via SQL queries in Sitecore 9:- declare @now datetime set @now= GETDATE() exec ...
Shailesh's user avatar
  • 717
3 votes
Accepted

Sitecore allow item to access only by Owner

Since you earlier mentioned, that only item owners should be able to view/edit the item, what I suggest is, to have your own implementation of the ItemResolver pipeline processor and in that, you can ...
Debabrata Biswas's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible