windows(server)安装jenkins时遇到的问题:this account either does not have the privilege logon as a service

原问题

this account either does not have the privilege logon as a service…

问题出现场景

在安装jenkins时要使用电脑或服务器的用户去将jenkins开启成一个服务。但是当我将我服务器的用户名、密码输入测试时,却会报上面的错误。错误不全但可以看到主要的意思,说此账户没有登录启用一个服务的权限。没有权限就开启权限呗!

网上找到的解决方法

由于百度没有找到像样的回答,我只能求助google或者必应找到了一个英文版的解决办法,为了让以后的小伙伴解决起来更方便,我把所有的操作步骤都使用图示的方法列出了。

Perform the following to edit the Local Security Policy of the computer you want to define the ‘logon as a service’ permission:
Logon to the computer with administrative privileges.
Open the ‘Administrative Tools’ and open the ‘Local Security Policy’
Expand ‘Local Policy’ and click on ‘User Rights Assignment’
In the right pane, right-click ‘Log on as a service’ and select properties.
Click on the ‘Add User or Group…’ button to add the new user.
In the ‘Select Users or Groups’ dialogue, find the user you wish to enter and click ‘OK’
Click ‘OK’ in the ‘Log on as a service Properties’ to save changes.

解决步骤

1.打开控制面板,点开系统和安全

windows(server)安装jenkins时遇到的问题:this account either does not have the privilege logon as a service_第1张图片
2.点开管理工具

windows(server)安装jenkins时遇到的问题:this account either does not have the privilege logon as a service_第2张图片
3.点开本地安全策略

windows(server)安装jenkins时遇到的问题:this account either does not have the privilege logon as a service_第3张图片
4.点开左侧栏目的本地策略

windows(server)安装jenkins时遇到的问题:this account either does not have the privilege logon as a service_第4张图片
5.点击右侧栏目的用户权限分配

windows(server)安装jenkins时遇到的问题:this account either does not have the privilege logon as a service_第5张图片
6.点击右下角的作为服务登录

windows(server)安装jenkins时遇到的问题:this account either does not have the privilege logon as a service_第6张图片
7.点击添加用户或组

windows(server)安装jenkins时遇到的问题:this account either does not have the privilege logon as a service_第7张图片
8.在输入的对象名称中将你的用户名输入进去,一般我们默认的用户都是Administrator,点击确定。

windows(server)安装jenkins时遇到的问题:this account either does not have the privilege logon as a service_第8张图片
OK!操作完上面的步骤你就可以使用该用户开启一个jenkins服务了。

你的点赞与评论是我最大的创作动力!

在这里插入图片描述

你可能感兴趣的:(#,Windows,this,account,either,does,not,have,the,privilege,logon,jekins)