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...

Crear servidor Ansible

Servidor Ansible Comenzamos instalando un sistema operativo CentOS 7 minimal, podemos hacerlo sobre una maquina virtual Hyper-V, Vmware o en la nube. En Centos 7 instalación mínima por defecto no se tiene conexión a la red dado que las interfaces ethernet no vienen habilitadas de forma predeterminada. Ejecutar comando " nmcli d " para un listado rápido de las interfaces de red instaladas en el equipo. Ejecutar el comando " nmtui " para abrir el Network manager Editar las interfaces y configurar en automático IPv4 y marcar la opción "Conectar de forma automática"  para obtener dirección IP desde un servidor DHCP. Ejecutar " Service Network Restart " Instalar el repositorio EPEL para Centos 7 Ejecutar " yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm " Instalar ansible Ejecutar " yum install ansible " Ejecutar " yum install python-pip " Ejecutar " pip inst...

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!!!!