Ir al contenido principal
Para darle permisos a un servicio hay que utilizar la siguiente guía, que ha sido tomada de los siguientes links:

http://serverfault.com/questions/187302/how-do-i-grant-start-stop-restart-permissions-on-a-service-to-an-arbitrary-user
http://msmvps.com/blogs/alunj/archive/2006/02/13/83472.aspx

There doesn't appear to be a GUI-based way of doing this unless you're joined to a domain - at least not one I could find anywhere - so I did a bit more digging and I've found an answer that works for our sitaution.
I didn't understand what the string representation meant in the knowledge base article, but doing a bit of digging led me to discover that it's SDDL syntax. Further digging led me to this article by Alun Jones which explains how to get the security descriptor for a service and what each bit means.
To append to the service's existing security descriptor, use sc sdshow "Service Name" to get the existing descriptor. If this is a plain old .NET Windows Service - as is the case with ours - the security descriptor should look something like this:
D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOC
RRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CR;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)S:(AU;FA
;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
We needed to grant permissions RP (to start the service), WP (to stop the service), DT (to pause/continue the service) and LO (to query te service's current status). This could be done by adding our service account to the Power Users group, but I only want to grant individual access to the account under which the maintenance service runs.
Using runas to open a command prompt under the service account, I ran whoami /all which gave me the SID of the service account, and then constructed the additional SDDL below:
(A;;RPWPDTLO;;;S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx-xxxx)
This then gets added to the D: section of the SDDL string above:
D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOC
RRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CR;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)(A;;RPWP
DTLO;;;S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx-xxxx)S:(AU;FA;CCDCLCSWRPWPDTLOC
RSDRCWDWO;;;WD)
This is then applied to the service using the sc sdset command:
sc sdset "Service Name" D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;
CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CR;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU
)(A;;RPWPDTLO;;;S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx-xxxx)S:(AU;FA;CCDCLCSW
RPWPDTLOCRSDRCWDWO;;;WD)

Entradas más populares de este blog

Solución de Problemas en la Migración del DataCollector de MMA a Azure ARC

  Síntomas Observados Error al Ejecutar Comandos: Al intentar ejecutar los comandos: Import-Module "C:\ODA\Binaries\bin\Microsoft.PowerShell.Oms.Assessments\Microsoft.PowerShell.Oms.Assessments" .\run.cmd Se obtiene el mensaje de error: "ExecPkg not found. File WindowsServerAssessment.execpkg". Ubicación Incorrecta del Archivo WindowsServerAssessment.execpkg: El archivo necesario se encuentra en una ubicación diferente a la esperada: C:\Packages\Plugins\Microsoft.ServicesHub.WindowsServerAssessment\1.7\bin Falta de Estructura de Carpeta Esperada: La carpeta esperada,  C:\ODA\Packages , no existe en el sistema. Errores Registrados en los Logs: En los registros (logs) del sistema se reporta el error: "Missing Mandatory file OmsAssessment.exe". Pasos para Solucionar los Problemas 1. Desinstalación del Microsoft Monitoring Agent (MMA) y Eliminación de Variables de Entorno Desinstala completamente el MMA asegurándote de eliminar todo el software relacionado. Ve...

Implementacion WordPress en Azure

Teniendo una cuenta en Azure, es muy fácil hacer una implementacion de WordPress. Estando el el portal de Azure, seleccionamos crear nuevo recurso y buscamos la palabra WordPress. Nos aparece la opción de crear un recurso WordPress WEB que es el que vamos a probar en este post. Luego de creado el recurso vamos a ver que se crearon los siguientes sub recursos: Un APP Service  y una Base de datos MySQL. Y dentro del APP service la URL para instalar el servicio de WordPress creado. Y esta pronto!!! Ya podes disfrutar de tu sitio de WordPress. Saludos!!!!

Backup profesional de mis datos con herramienta gratis.

Hoy en día es una necesidad tener respaldo de nuestras información y toda ella esta en riesgo de ser encriptada por un ransonware o cryptolocker, o de perderse por una falla de nuestro disco duro. La solución ¿cual es? Tener un buen respaldo!!. Hoy en día contamos con una solución profesional gratis que se encarga de gestionar los respaldos de nuestra información importante. Con el agente de respaldo para Windows de Veeam podrás realizar copias de tu información importante y de tus aplicaciones en un disco duro externo. Si te interesa conocer mas sobre esta herramienta profesional de respaldo gratis, puedes visitar el siguiente enlace: https://www.veeam.com/es-lat/windows-cloud-server-backup-agent.html Seguinos en Instagram @exabyteuy