• jenkins管理员没有权限 


    jenkins从角色管理权限策略转移,默认策略后再登录,管理员登陆提示:Access Denied admin没有Overall/Read权限
    此时可以登录,但是不能够对jenkins系统进行配置.

    操作:
    1,
    进入jenkins 家目录下,有config.xml 一般为~/.jenkins 目录下,修改此配置文件

    vim   config.xml
    
    
    ##删除以下数据后重启服务
    <useSecurity>true</useSecurity>
      <authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy">
        <permission>hudson.model.Item.Build:build</permission>
        <permission>hudson.model.Item.Cancel:build</permission>
        <permission>hudson.model.Item.Configure:build</permission>
        <permission>hudson.model.Item.Create:build</permission>
        <permission>hudson.model.Item.Delete:build</permission>
        <permission>hudson.model.Item.Discover:build</permission>
        <permission>hudson.model.Item.Read:build</permission>
        <permission>hudson.model.Item.Workspace:build</permission>
      </authorizationStrategy>
      <securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
        <disableSignup>true</disableSignup>
        <enableCaptcha>false</enableCaptcha>
      </securityRealm>
    
    
    
    

    2,改回原来默认的策略
    http://192.168.2.141:8080/configureSecurity/访问

    设置:
    1,启用安全
    2,安全域--->Jenkins’ own user database
    3,授权策略--->Logged-in users can do anything

    恢复默认状态

    忘记密码

    #jenkins目录下user/admin-xxx/config.xml
    123456加密后: #jbcrypt:$2a$10$MiIVR0rr/UhQBqT.bBq0QehTiQVqgNpUGyWW2nJObaVAM/2xSQdSq
    修改后重启服务
    
    
    
    
  • 相关阅读:
    GC选择之CMS 并发标记清除
    JVM内存概览与GC初步
    Shell 判断语句
    SUID SGID
    maven package
    ACL权限控制列表
    账户与密码管理
    Ubuntu与Centos在登陆安全方面的比较
    【PL/SQL Developer】动态执行表不可访问,本会话的自动统计被禁止
    【Centos7】Delete virtual bridge
  • 原文地址:https://www.cnblogs.com/g2thend/p/12402386.html
Copyright © 2020-2023  润新知