重置超级用户

ENTERPRISE

使用 DC/OS 重置超级用户脚本重置现有用户或创建新用户

您可使用 DC/OS 重置超级用户脚本重置现有用户或创建新用户。如果超级用户帐户被锁定或无效,这将非常有用。

先决条件您必须具有 DC/OS 群集的 SSH 访问权限。

  1. SSH 到主节点,使用您选择的方法。 例如:
    1. dcos node ssh master-proxy leader
  2. 导航至 /opt/mesosphere/active/bouncer/bouncer/bin/ 并运行用户名为 (<username>) 的 reset-superuser 脚本。
    1. sudo /opt/mesosphere/bin/dcos-shell /opt/mesosphere/active/bouncer/bouncer/bin/reset-superuser <username>
  3. 输入用户的新密码,然后按照提示完成程序。
    1. Type superuser password:
    2. Retype superuser password:
    对于现有用户,输出应当类似:
    1. 170518-22:11:11.630 INFO: Attempt to create user with uid &lt;username&gt;.
    2. 170518-22:11:12.111 INFO: User already exists.
    3. 170518-22:11:12.111 INFO: Update password for user with uid &lt;username&gt;.
    4. 170518-22:11:12.597 INFO: Password updated.
    5. 170518-22:11:12.597 INFO: Attempt to create ACL with rid dcos:superuser.
    6. 170518-22:11:12.668 INFO: ACL already exists.
    7. 170518-22:11:12.668 INFO: Attempt to create group with gid superusers.
    8. 170518-22:11:12.735 INFO: Group already exists.
    9. 170518-22:11:12.735 INFO: Attempt to assign superuser privileges to the superusers group.
    10. 170518-22:11:12.803 INFO: Permission is already set.
    11. 170518-22:11:12.803 INFO: Attempt to put uid &lt;username&gt; into the superusers group.
    12. 170518-22:11:12.877 INFO: User added to group.
    13. 170518-22:11:12.877 INFO: Done.