[DOCS-2101] Permissions Issue when Installing MMS Monitoring on Windows Created: 17/Oct/13  Updated: 02/Sep/14  Resolved: 24/Jan/14

Status: Closed
Project: Documentation
Component/s: Cloud Manager, manual
Affects Version/s: None
Fix Version/s: v1.3.0

Type: Task Priority: Minor - P4
Reporter: William Cross Assignee: Tim Slavin
Resolution: Done Votes: 0
Labels: ExecutionPolicy, mms, mms-agent, mms-docs, powershell, virtualbox, windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7
VirtualBox


Participants:
Days since reply: 10 years, 3 weeks, 5 days ago

 Description   

When preparing the system to run MMS, I ran into a permissions issue with a command I was instructed to use. This is a problem because when we're stepping people through this, they may be prevented from installing MMS if our instructions don't work for them. I suggest we determine the scope of the error, and possibly update the doc.

Steps to reproduce:

I went to this URL: http://mms.mongodb.com/help/monitoring/tutorial/install-the-mms-agent-on-windows/

On "Install Agent Software," step 4, when I input "Get-ExecutionPolicy", it was "Restricted." As per the instructions, I then input "Set-ExecutionPolicy -ExecutionPolicy Unrestricted".

As mentioned, this was on Windows 7, with VertualBox, on an administrative account.

When it asked me to confirm, it replied:

"Set-ExecutionPolicy : Access to the registry key 'HKEY_LOCAL_MACHINE|SOFTWARE|Microsoft\PowerShell\1\ShellIds\Microsoft.Powershell' is denied. At line:1 char:20 + Set Execution Policy <<<< + CategoryInfo: NotSpecified: (:) [Set-ExecutionPolicy], UnauthorizedAccessException  + FullyQalifiedErrorId: System.UnauthorizedAccessException,Microsoft.Powershell.Commands.SetExecutionPolicyCommand

It did not change the policy.

I found the solution here: http://stackoverflow.com/questions/4647429/powershell-on-windows-7-set-executionpolicy-for-regular-users

under the 2nd answer:

Set-ExecutionPolicy Unrestricted -Scope CurrentUser

(this worked)
Apparrently, this only sets the execution policy for the current user (in HKEY_CURRENT_USER) rather than the entire local machine (HKEY_LOCAL_MACHINE).



 Comments   
Comment by Githook User [ 24/Jan/14 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-2101: minor edits
Branch: master
https://github.com/10gen/mms-docs/commit/ab1b731ea65ee487d5ebf44e5f78a5b076edcc9d

Comment by David Golub [ 24/Jan/14 ]

Yes, this is fine for now. I was just making note that there are more long-term issues that will eventually need to be addressed.

Comment by Tim Slavin [ 24/Jan/14 ]

Got it. And will definitely include in the updated Windows page in about
two weeks. For today, though, is this change good and accurate? The ticket
asks to highlight the difference between local machine and current user,
plus the PowerShell command differences.

Let me know if this looks good to you. Thanks!

Tim

Comment by David Golub [ 24/Jan/14 ]

This is as good as we can do given that we're using PowerShell. The only case where this wouldn't work is if the user's system administrator has used Group Policy to block unsigned PowerShell scripts. You can reproduce this condition on your computer by downloading the administrative templates for PowerShell from http://www.microsoft.com/en-us/download/details.aspx?id=25119 and using the Group Policy MMC snap-in, gpedit.msc. In this case, the only thing the user can do is to have the administrator remove the restriction. In the long run, we'll get around this issue by taking PowerShell out of the equation altogether when we do an installer for the agent. For now, this is the best we can do.

Comment by William Cross [ 06/Nov/13 ]

Based on this comment:

https://education.mongodb.com/courses/10gen/M102/2013_September/discussion/forum/i4x-10gen-M102-course-2013_September/threads/5273eb8aabcee8c31e004853

I think we may need both versions. I don't think my solution should be a replacement. It looks like an either-or, depending on where in the registry the python key is found (either HKEY_LOCAL_MACHINE for the existing description, or HKEY_CURRENT_USER for the version I used).

Comment by Sam Kleinman (Inactive) [ 17/Oct/13 ]

sridhar do you have any insight? If the solution that william.cross proposes is viable/correct it's quick fix.

cc cailin.nelson@10gen.com

Generated at Thu Feb 08 07:42:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.