如何使用cf命令行管理bluemix中的组织和空间用户? [英] How do I manage org and space users in bluemix using cf command line?

查看:151
本文介绍了如何使用cf命令行管理bluemix中的组织和空间用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Bluemix提供了一个CF命令行,可供下载以管理应用程序.

Bluemix provides a CF command line for download to manage applications.

我们想使用CF(或任何其他命令行工具)来管理组织和空间用户.这将使我们能够以编程方式同步用户列表.

We want to use CF (or any other command line tools ) to manage Organization and Space users. This will allow us to programmatically sync the user list.

特别是我在寻找 cf注册用户 cf add-user cf remove-user cf取消注册使用

Specifically I am looking for cf enroll-user cf add-user cf remove-user cf unenroll-use

cf命令已经列出了给定ORG和SPACE的用户.

the cf command already lists the users for a given ORG and SPACE.

推荐答案

简单的答案是阅读文档.请参阅"使用cf CLI创建和管理用户.它记录了create-userset-org-roleset-space-role之类的命令.

The simple answer is to read the docs. See "Creating and Managing Users with the cf CLI." It documents commands like create-user, set-org-role, and set-space-role.

例如:使用cf create-user USERNAME PASSWORD创建一个新用户.问题是,当您尝试在Bluemix中执行此操作时,会出现错误:

For example: Use cf create-user USERNAME PASSWORD to create a new user. The problem is, when you try to do this in Bluemix, you get an error:

>cf create-user jdoe password
Creating user jdoe as bwoolf...
FAILED
Error creating user jdoe.
Server error, status code: 403, error code: access_denied, message: Invalid token does not contain resource id (scim)

当您尝试运行set-org-roleset-space-role时,也会收到类似的错误:

You get a similar error when you try to run set-org-role or set-space-role:

FAILED
Server error, status code: 403: Access is denied.  You do not have privileges to execute this command.

为什么会出现此错误?就像@RandalAnders解释的那样,Bluemix当前阻止用户使用CF CLI中的这些用户管理命令.目前,您需要使用Bluemix仪表板执行这些操作.

Why did you get this error? Like @RandalAnders explained, Bluemix currently blocks users from using these user administration commands in the CF CLI. For the time being, you'll need to perform these actions using the Bluemix Dashboard.

这篇关于如何使用cf命令行管理bluemix中的组织和空间用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆