Solved

Importing a certificate fails due to lack of permissions

Posted on 2013-12-03
2
183 Views
Last Modified: 2013-12-06
Hello
Attempting to import 2 certs on a Windows 7 clients into the users personal user store and the CA stores with a CertUtil bat script. The script works fine but, only when the logged in user has local administrator rights. Any idea's how I get these scripts to run without giving the user local administrator rights? Open to other ideas and approaches as well.
Thanks
0
Comment
Question by:jwill80
2 Comments
 
LVL 18

Accepted Solution

by:
Steven Harris earned 500 total points
ID: 39693990
You can have the script call itself with PsExec's -h option to run elevated.

or you can move over to PowerShell which can run most of the cmd scripts.

If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))

{   
$arguments = "& '" + $myinvocation.mycommand.definition + "'"
Start-Process powershell -Verb runAs -ArgumentList $arguments
Break
}

#YOUR CODE HERE

Open in new window

0
 
LVL 1

Author Comment

by:jwill80
ID: 39700573
Thanks. Tried using a power shell script and it imports the machine cert into the users personal machine store, and used GPO to target the root  cert. However, the client isn't authenticating even thought the certs are in the proper stores. Reviewing logs to see what the issue is.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

So many times I have seen the words written in a question "if only I could show you" or " I know how hard it is for you since you can't see it" in any zone. That has inspired me to write about this tool in windows 7 called "Problem Steps Recorder…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now