Solved

Importing a certificate fails due to lack of permissions

Posted on 2013-12-03
2
190 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

756 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