Return-Path: X-Original-To: apmail-syncope-commits-archive@www.apache.org Delivered-To: apmail-syncope-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 23BA6186C5 for ; Wed, 16 Dec 2015 16:51:00 +0000 (UTC) Received: (qmail 47181 invoked by uid 500); 16 Dec 2015 16:51:00 -0000 Delivered-To: apmail-syncope-commits-archive@syncope.apache.org Received: (qmail 47152 invoked by uid 500); 16 Dec 2015 16:51:00 -0000 Mailing-List: contact commits-help@syncope.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@syncope.apache.org Delivered-To: mailing list commits@syncope.apache.org Received: (qmail 47138 invoked by uid 99); 16 Dec 2015 16:51:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2015 16:51:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D0244E099B; Wed, 16 Dec 2015 16:50:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: massi@apache.org To: commits@syncope.apache.org Date: Wed, 16 Dec 2015 16:50:59 -0000 Message-Id: <4b6fab11a0014034bc1c4f5244be13b9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] syncope git commit: refactoring of CLI documentation, SYNCOPE-700 Repository: syncope Updated Branches: refs/heads/master 546ea0bf3 -> dbc909278 http://git-wip-us.apache.org/repos/asf/syncope/blob/dbc90927/src/main/asciidoc/workingwithapachesyncope/cli/user.adoc ---------------------------------------------------------------------- diff --git a/src/main/asciidoc/workingwithapachesyncope/cli/user.adoc b/src/main/asciidoc/workingwithapachesyncope/cli/user.adoc index ed2715c..30fd6fd 100644 --- a/src/main/asciidoc/workingwithapachesyncope/cli/user.adoc +++ b/src/main/asciidoc/workingwithapachesyncope/cli/user.adoc @@ -32,502 +32,48 @@ Usage: user [options] Syntax: --get-user-key {USERNAME} {USERNAME} [...] --get-username Syntax: --get-username {USER-ID} {USER-ID} [...] - --read - Syntax: --read {USER-ID} {USER-ID} [...] - --search-by-attribute + --read-by-usernam + Syntax: --read-by-usernam {USERNAME} {USERNAME} [...] + --read-by-userid + Syntax: --read-by-userid {USER-ID} {USER-ID} [...] + --search-by-attribute Syntax: --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE} - --search-by-role + --search-by-role Syntax: --search-by-role {REALM} {ROLE-ID} - --search-by-resource + --search-by-resource Syntax: --search-by-resource {REALM} {RESOURCE-NAME} - --delete + --delete Syntax: --delete {USER-ID} {USER-ID} [...] --delete-all Syntax: --delete-all {REALM} - --delete-by-attribute + --delete-by-attribute Syntax: --delete-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE} ---- -===== Details option -This option shows a table with some details about the users. - -[source] --- -$ ./syncopeadm.sh user --details --- - -[source] --- - -You are running: user --details - -################################# -# # -# USERS DETAILS # -# # -################################# -# # # -# DETAIL # VALUE # -# # # -################################# -# # # -# Total number # 5 # -# Active # 5 # -# Suspended # 0 # -# Without resources # 0 # -# Without roles # 2 # -# # # -################################# - --- - -===== List option -Running the command with this option you will see the list of all users in the environment. However, the system will ask you a confirmation before execution, because as you can imagine this operation might produce very large output. - -[source] --- -$ ./syncopeadm.sh user --list --- -[source] --- -You are running: user --list - -This operation might produce very large output. Do you want to continue? [yes/no] -yes - - > USER ID: 2 - username: verdi - realm: / - status: active - RESOURCES: - - ws-target-resource-list-mappings-1 - - ws-target-resource-list-mappings-2 - ROLES: - creation date: Wed Oct 20 11:00:00 CEST 2010 - change password date: null - PLAIN ATTRIBUTES: - fullname: [Giuseppe Verdi] - firstname: [Giuseppe] - surname: [Verdi] - userId: [verdi@apache.org] - email: [verdi@syncope.org] - DERIVED ATTRIBUTES: - info: [verdi - 2010-10-20T11:00:00+0200[0]] - is readonly. - noschema: [Verdi, ] - is readonly. - cn: [Verdi, Giuseppe] - is readonly. - VIRTUAL ATTRIBUTES: - creator: admin - last modifier: admin - token: null - token expiration time: null - last change: Wed Oct 20 11:00:00 CEST 2010 - last login: null - failed logins: 0 -RELATIONSHIPS: - security question id: null - security question answer id: null +===== Options --- - -===== Get user key option +--details:: +This option shows a table with some details about the users. +-- List option:: +Running the command with this option you will see the list of all users in the environment. However, the system will +ask you a confirmation before execution, because as you can imagine this operation might produce very large output. +--get-user-key:: The option to get the user key starting from a username. - -[source] --- -$ ./syncopeadm.sh user --get-user-key {USERNAME} --- - -[source] --- -You are running: user --get-user-key rossini - - - rossini user ID is 1 --- - -===== Get username option +--get-username:: The option to get the username starting from a user id. - -[source] --- -$ ./syncopeadm.sh user --get-user-key {USER-ID} --- - -[source] --- -You are running: user --get-username 1 - - - 1 username is rossini --- - -===== Read by user id option +--read-by-userid:: The option to read user information by their user id. - -[source] --- -$ ./syncopeadm.sh user --read {USER-ID} {USER-ID} [...] --- - -[source] --- - -You are running: user --read 1 - - > USER ID: 1 - username: rossini - realm: /even - status: active - RESOURCES: - - resource-testdb2 - - ws-target-resource-2 - ROLES: - - Other - creation date: Wed Oct 20 11:00:00 CEST 2010 - change password date: null - PLAIN ATTRIBUTES: - type: [G] - fullname: [Gioacchino Rossini] - firstname: [Gioacchino] - surname: [Rossini] - userId: [rossini@apache.org] - loginDate: [2009-05-26, 2010-05-26] - DERIVED ATTRIBUTES: - info: [rossini - 2010-10-20[0]] - is readonly. - noschema: [Rossini, ] - is readonly. - cn: [Rossini, Gioacchino] - is readonly. - VIRTUAL ATTRIBUTES: - creator: admin - last modifier: admin - token: null - token expiration time: null - last change: Wed Oct 20 11:00:00 CEST 2010 - last login: null - failed logins: 0 -RELATIONSHIPS: - security question id: null - security question answer id: null - --- - -===== Read by username option +--read-by-usernam:: The option to read user information by their username. - -[source] --- -$ ./syncopeadm.sh user --read {USERNAME} {USERNAME} [...] --- - -[source] --- - -You are running: user --read rossini - - > USER ID: 1 - username: rossini - realm: /even - status: active - RESOURCES: - - resource-testdb2 - - ws-target-resource-2 - ROLES: - - Other - creation date: Wed Oct 20 11:00:00 CEST 2010 - change password date: null - PLAIN ATTRIBUTES: - type: [G] - fullname: [Gioacchino Rossini] - firstname: [Gioacchino] - surname: [Rossini] - userId: [rossini@apache.org] - loginDate: [2009-05-26, 2010-05-26] - DERIVED ATTRIBUTES: - info: [rossini - 2010-10-20[0]] - is readonly. - noschema: [Rossini, ] - is readonly. - cn: [Rossini, Gioacchino] - is readonly. - VIRTUAL ATTRIBUTES: - creator: admin - last modifier: admin - token: null - token expiration time: null - last change: Wed Oct 20 11:00:00 CEST 2010 - last login: null - failed logins: 0 -RELATIONSHIPS: - security question id: null - security question answer id: null - --- - -===== Search by attribute option +--search-by-attribute:: The option to search a list of users with a common attribute. - -[source] --- -$ ./syncopeadm.sh user --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE} --- - -For instance if you want to search the active users under the root realm: - -[source] --- - -You are running: user --search-by-attribute / status=active - - > USER ID: 2 - username: verdi - realm: / - status: active - RESOURCES: - - ws-target-resource-list-mappings-1 - - ws-target-resource-list-mappings-2 - ROLES: - creation date: Wed Oct 20 11:00:00 CEST 2010 - change password date: null - PLAIN ATTRIBUTES: - fullname: [Giuseppe Verdi] - firstname: [Giuseppe] - surname: [Verdi] - userId: [verdi@apache.org] - email: [verdi@syncope.org] - DERIVED ATTRIBUTES: - info: [verdi - 2010-10-20T11:00:00+0200[0]] - is readonly. - noschema: [Verdi, ] - is readonly. - cn: [Verdi, Giuseppe] - is readonly. - VIRTUAL ATTRIBUTES: - creator: admin - last modifier: admin - token: null - token expiration time: null - last change: Wed Oct 20 11:00:00 CEST 2010 - last login: null - failed logins: 0 -RELATIONSHIPS: - security question id: null - security question answer id: null - - > USER ID: 3 - username: vivaldi - realm: / - status: active - RESOURCES: - - ws-target-resource-delete - - ws-target-resource-1 - - ws-target-resource-2 -[...] --- - -===== Search by role option +--search-by-role:: The option to search a list of users with a specified role. - -[source] --- -$ ./syncopeadm.sh user --search-by-role {REALM} {ROLE-NAME} --- - -[source] --- - -You are running: user --search-by-role / Other - - > USER ID: 1 - username: rossini - realm: /even - status: active - RESOURCES: - - resource-testdb2 - - ws-target-resource-2 - ROLES: - - Other - creation date: Wed Oct 20 11:00:00 CEST 2010 - change password date: null - PLAIN ATTRIBUTES: - type: [G] - fullname: [Gioacchino Rossini] - firstname: [Gioacchino] - surname: [Rossini] - userId: [rossini@apache.org] - loginDate: [2009-05-26, 2010-05-26] - DERIVED ATTRIBUTES: - info: [rossini - 2010-10-20[0]] - is readonly. - noschema: [Rossini, ] - is readonly. - cn: [Rossini, Gioacchino] - is readonly. - VIRTUAL ATTRIBUTES: - creator: admin - last modifier: admin - token: null - token expiration time: null - last change: Wed Oct 20 11:00:00 CEST 2010 - last login: null - failed logins: 0 -RELATIONSHIPS: - security question id: null - security question answer id: null - --- - -===== Search by resource option +--search-by-resource:: The option to search a list of users with a specified resource. - -[source] --- -$ ./syncopeadm.sh user --search-by-resource {REALM} {RESOURCE-NAME} --- - -[source] --- - -You are running: user --search-by-resource / ws-target-resource-2 - - > USER ID: 3 - username: vivaldi - realm: / - status: active - RESOURCES: - - ws-target-resource-delete - - ws-target-resource-1 - - ws-target-resource-2 - ROLES: - creation date: Wed Oct 20 11:00:00 CEST 2010 - change password date: null - PLAIN ATTRIBUTES: - firstname: [Antonio] - surname: [Vivaldi] - fullname: [Antonio Vivaldi] - userId: [vivaldi@apache.org] - email: [vivaldi@syncope.org] - type: [F] - DERIVED ATTRIBUTES: - cn: [Vivaldi, Antonio] - is readonly. - noschema: [Vivaldi, ] - is readonly. - info: [vivaldi - 2010-10-20T11:00:00+0200[0]] - is readonly. - VIRTUAL ATTRIBUTES: - creator: admin - last modifier: admin - token: null - token expiration time: null - last change: Wed Oct 20 11:00:00 CEST 2010 - last login: null - failed logins: 0 -RELATIONSHIPS: - security question id: null - security question answer id: null - - > USER ID: 1 - username: rossini - realm: /even - status: active - RESOURCES: - - resource-testdb2 - - ws-target-resource-2 - ROLES: - - Other - creation date: Wed Oct 20 11:00:00 CEST 2010 - change password date: null - PLAIN ATTRIBUTES: - type: [G] - fullname: [Gioacchino Rossini] - firstname: [Gioacchino] - surname: [Rossini] - userId: [rossini@apache.org] - loginDate: [2009-05-26, 2010-05-26] - DERIVED ATTRIBUTES: - info: [rossini - 2010-10-20[0]] - is readonly. - noschema: [Rossini, ] - is readonly. - cn: [Rossini, Gioacchino] - is readonly. - VIRTUAL ATTRIBUTES: - creator: admin - last modifier: admin - token: null - token expiration time: null - last change: Wed Oct 20 11:00:00 CEST 2010 - last login: null - failed logins: 0 -RELATIONSHIPS: - security question id: null - security question answer id: null - --- - -===== Delete option +--delete The option to delete a specified user. - -[source] --- -$ ./syncopeadm.sh user --delete {{USER-ID} {USER-ID} [...] --- - -The delete option, as can be imagined, tries to remove a specified user. -[source] --- - - User {USER-ID} successfully deleted --- - -===== Delete by attribute option +--delete-by-attribute The option to delete the users with a common attribute. - -[source] --- -$ ./syncopeadm.sh user --delete-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE} --- - -[source] --- - You are running: user --delete-by-attribute / surname=Rossini - - - Deleted users: 1 --- - -===== Delete all option -The option to delete all users of the realm passed as input. - -[source] --- -$ ./syncopeadm.sh user --delete-all {REALM} --- - -The delete option, as can be imagined, tries to remove every user under the specified realm. - -[NOTE] -To run this operation the system asks you again for the admin credential. - -[source] --- -You are running: user --delete-all / - -Running this operation you will delete all the realm users managed by Syncope, are you sure? [yes/no] -yes - -Username: -admin - -Password: -password -Deleting process started - - - Deleted users: 2 - -######################### -# # -# USERS NOT DELETED # -# # -######################### -# # # -# USER ID # CAUSE # -# # # -######################### -# # # -# 5 # FAILURE # -# # # -######################### - --- - -The output is composed of two parts. The first one is the number of deleted users; the second one is a table with the users (user id) who aren't removed. - -To know the reason why the deletion failed you need to run the command with the standard delete option. - -[source] --- -You are running: user --delete 5 - - - Error: GroupOwnership [6 director] --- +--delete-all +The option to delete all users of the realm passed as input. \ No newline at end of file