Solved

Importing a certificate fails due to lack of permissions

Posted on 2013-12-03
2
189 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
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.

825 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