Access denied with mmc.exe - mmc

I have a strange error that came up in front of me. I am getting an mmc.exe error (MMC is the Microsoft Management Console). When I open services.msc it gives me this error and it says
Your administrator has blocked this service for security purpose".
Source: "C:\Windows\System32\mmc.exe" "C:\Windows\System32\services.exe"
What is the correct solution and how to fix this error?
Thanks in advance.

This fixed it for me:
Use regedit.exe to navigate to this registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
You have to set the value of "EnableLUA" to "0" (zero). A reboot is necessary.
Source/credits:
https://social.technet.microsoft.com/Forums/en-US/1adf0029-1f06-4738-975a-4fd69b652168/uac-preventing-mmc-application-from-runnning
I hope it will help you too!

Related

Access denied when using runas on Windows Server 2022

This is something I encountered after upgrading our servers from 2016/2019 to 2022:
When I tried to open our Active Directory with another user, it would always deny the access even though the user has full admin rights.
I do not know what exactly they changed or why it is happening.
Since I do not have access to the Group Policy (outsourced IT), I had to do the following for every server:
Stop the seclogon service (if running) over the console with net stop seclogon
You need to open the console with admin rights for this to work. Paste the following wrapped command into the console and press enter:
sc sdset seclogon D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWRPDTLOCRRC;;;IU)(A;;CCLCSWDTLOCRRC;;;SU)(A;;CCLCSWRPDTLOCRRC;;;AU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
The runas command will now work again.

'mysql_upgrade' Access denied for user 'root'#'localhost' on M1 Mac

I followed the macos installation of MariDB on their website and I always get this error when I try to run mysql_upgrade
I also can't secure the installation due to the same error
Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
ERROR 1698 (28000): Access denied for user 'root'#'localhost'
FATAL ERROR: Upgrade failed
I tried following tutorials but they don't work.
What should I do?
EDIT
Sorry, I forgot I posted a question here.
It's all good now! I was able to make it work. All I did was use mariadb -u root -p instead, and the password was root.
The tutorial I used was the one from Mariadb's official website.
As for this solution, I forgot where I got it from but, kudos to you who helped me!
You haven't posted which tutorials you have followed.
Have you tried
mysql_upgrade -p
it will prompt for root password. You can even run it with a different user using the -u option.
Hope this helps.
FYI: https://mariadb.com/kb/en/mysql_upgrade/

XCode 9 unknown error -1 = fffffffffff command/bin/sh failed with exit code 1

I have been trying to test my app on a real device and I keep getting this error. I have tried changing my project to this selected answer already XCode 9.1 Command /bin/sh failed with exit code 1 , but it did not work and I have also deleted my derived data already. I hope someone can help me! Thanks!!
If you search around there are a lot of solutions presented to solve this problem. But a few them are outdated or very specific to a certain domain. Recently I ran into the same issue with Charts and Xcode refusing to build to my device with the same error message. The problem you're having has nothing to do with your free developer account but rather with the keychain.
To solve it you'll have to do the following:
Open Terminal and type: security set-key-partition-list -S apple-tool:,apple:,codesign: -s /Users/YOUR_USERNAME/Library/Keychains/login.keychain-db
You'll be prompted for your password. If you enter your password correctly and are repeatedly told it is incorrect go into Utilities -> Keychain Access.
Select and deselect the lock. Enter your password when prompted. Re-enter the command on terminal input your password and then clean/build on Xcode. Everything should work as before.

GhostScript on IIS6 causing Permission Denied error

I'm running a server with Windows 2003 and IIS 6.0. I'm using GhostScript to create pdf's that are a subset of pages from the full text using WScript.shell. The line (111) that is giving me the error message is:
iReturn = oShell.Run(gs\bin\gswin32c.exe -sDEVICE=pdfwrite -q -dNOPAUSE -dBATCH -sOutputFile="temppdf\pdfpp2_5.pdf" -dFirstPage=2 -dLastPage=5 "pdfComplete\LargeFile.pdf", 0, true)
--Most is done through scripting and variables, I've filled out file names just for continuity.
Here is the error message:
Microsoft VBScript runtime error '800a0046'
Permission denied
sendpdf.asp, line 111
I have given the IIS user full permissions on all folders involved. Does anyone see anything that I am missing or have a thought where I should go from here? Thanks!
To solve this issue...
Go to IIS Manager --> Local Computer
-->Application Pools.
Then, right click on DefaultAppPool then select Properties
Under the Identity Tab, check how your system is running them
An update evidently changed mine from "Configurable" so I can list what I want and set it to "Network Service". If you are VERY confident in your security (or are just using it for Intranet or the like), you could set it to "Local Service" or "Local System", but I would highly recommend against that except in extreme cases. A day full of research is complete!
Check the permissions of the Temp folder as well. The IIS should have permissions to the Temp folder

Using SC.exe to set service credentials password fails

I know this question has been asked in the past, but a satisfactory answer has not been provided.
I am using the SC command to config the credentials for a service.
SC.exe config "SERVICE NAME" obj= "domain\user" password= "password"
This completes successfully, but when I start the service, it fails
to perform the login.
[NET START "service name"]
If I manually update ONLY the password from the services.msc, then
when I start the service it works fine.
I have hundreds of servers to update this change occurs in the middle of a deployment,
so manual intervention is NOT an option.
I have tried using the config to update the login account and then another config command for the password.
From all accounts, the SC.exe does not work for passwords and Microsoft has NO help.
IDEAS?
Besides stopping the service before making the changes, and granting the user permission to logon as a service, I also had to add the type= own parameter, otherwise it would fail with:
[SC] ChangeServiceConfig FAILED 87:
The parameter is incorrect
So this is the command that worked:
SC.EXE config "ServiceName" type= own obj= "domain\user" password= "password"
It even worked with special characters in the password, given I had the password between double brackets.
When you configure a service to run under a specific account via the normal route from the service properties windows automatically grants the account the log in as service right. When you use sc.exe you also have to grant the user the log on as service right.
Log On As Service Right
Before restarting services, you should grant your user permission to logon as a service.
Unfortunately, no way to do it from command line with default windows tools, but you can use small additional util ntright.exe from Windows Server 2003 Resource Kit Tools.
Download it from https://www.microsoft.com/en-us/download/details.aspx?id=17657
After installation you'll get a lot of tools in C:\Program Files (x86)\Windows Resource Kits\Tools (or in Program Files on 32bit machine).
You need ntrights.exe. You can copy it and run from any place on another host.
To grant your user required permission, you should add to your script:
ntrights.exe +r SeServiceLogonRight -u "%DOMAIN%\%USER%"
After that you can successfully restart services with a new user.
Also there is an option to run ntrights.exe on remote host:
ntrights.exe +r SeServiceLogonRight -u "%DOMAIN%\%USER%" -m %HOSTNAME%
This tool helps me very much when I need reconfigure a lot of hosts remotely.
To enable log on as a service via script I've written this, you can use it as is or pull out what is useful to you
https://raw.githubusercontent.com/cdaf/windows/master/automation/provisioning/setServiceLogon.ps1
Try to stop the service before setting up the password:
sc.exe stop "<my_service>" 4:4:3
sc.exe config "<my_service>" obj= "\.<local_acc_name>" password= "<local_acc_pass>"
sc.exe start "<my_service>"
I had this issue. Thanks to ST's comment on the original post, I realized I needed to research how to type the password. In my case, I needed to double up the percent sign (%%) in the password.
The link ST provided is helpful: Escaping special characters in cmd.
Run against this problem while doing some Powershell scripting and the issue in my case was the special characters in the password.
Got it working by storing the password in a variable with double quotes around it:
$servicePassword = "`"passwordWithSpecialCharacters`""
cmd /c sc config myService obj= mydomain\myuser password= $servicePassword
Special characters are:
()'"$><^?
Try This.
Start menu - type "local security policy" without the quotes. Open the "Local Policies", then left-click on "User Rights Assignment". On the right panel, right-click on "Log on as a service", and select "Properties". Click on "Add User or Group" and add your user. Click OK. You might have to reboot your machine.
After adding you can set the user name and password for the service in cmd.

Resources