This is one of those things I’ve done a few times but infrequently enough that I can never remember how to do it. I have some users set up to run local services, like a web server. I don’t want those users to be able to log in to the machine at all. Not locally from the keyboard, or over the network, or by remote desktop.
There are some sites offering really bad advice to add an entry to the registry to accomplish this. To be fair most people are asking the question in the form of, “How do I keep a user from showing up on the login/welcome screen.” Even there though there is a better, less hacky, answer. Local Security Policy.
- Start Menu >> Administrative Tools >> Local Security Policy.
- In the left pane click on Local Policies >> User Rights Assignment.
- Find the policy in the right pane called “Deny log on locally.”
- Double click it and add the user in question to the dialog box.
- If you only want this user to “log on” when NT Services launches the service you created it for, do the same for the policies “Deny log on through Remote Desktop Service” (it might say Terminal Services) and “Deny access to this computer from the network.”