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

Probando Workplace join en Windows Server 2012 R2

Buen día, La idea del día de hoy es hacer un laboratorio de prueba para probar la característica Workplace join de Windows Server 2012 R2. La función de esta característica es poder realizar Single-Sign-On desde dispositivos IOs y Android para consumir datos y servicios en nuestra red corporativa, dado que estos dispositivos no pueden ser incluidos como objetos en nuestro Active Directory. Para poder realizar este laboratorio vamos a necesitar tener un dominio de Active Directory, también necesitaremos implementar Active Directory Federation Services y Active Directory Certification Services, este ultimo para emitir certificados internamente en nuestra organización. En mi caso ya tengo un laboratorio con un dominio creado y el controlador de dominio correspondiente, también eh implementado el rol de Active Directory Certificate Services para los certificados. El foco principal que quiero abordar aquí son los pasos correspondientes a la implementación de la característica Workpl...

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

Herramienta automatizacion de impresiones de pantalla

Con Windows 7 tenemos la aplicación psr.exe que automatiza la toma de impresiones de pantalla y las acciones del usuario y genera un reporte. Debemos ir a configuración y definir una ruta donde psr.exe guardara el archivo con el reporte, también podemos darle un numero entre 0 y 100 que podemos darle de cantidad de impresiones de pantalla que va a guardar. Mas información en el siguiente link http://blogs.technet.com/b/mspfe/archive/2013/03/22/uncovering-a-hidden-gem-psr-exe.aspx