ECS: Come modificare o sbloccare la gestione e monitorare gli utenti con l'API REST

Summary: Come modificare o sbloccare la gestione e monitorare gli utenti utilizzando l'API. Come modificare la password di emcmonitor quando non è possibile accedere utilizzando l'interfaccia utente. ...

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

A volte gli utenti dimenticano la password e non possono più accedere a ECS con le proprie credenziali.

Per modificare la password con l'API REST:

  1. Ottenere un elenco degli utenti correnti. Il comando seguente elenca tutti gli utenti tranne emcmonitor e emcservice:

Comando:

# svc_rest_cmd -u root -p ChangeMe /vdc/users/

Esempio:

admin@ecsnode1:~> svc_rest_cmd -u root -p ChangeMe /vdc/users/
svc_rest_cmd 1.0.10

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mgmt_user_infos>
  <mgmt_user_info>
    <is_external_group>false</is_external_group>
    <isSystemAdmin>false</isSystemAdmin>
    <isSystemMonitor>false</isSystemMonitor>
    <userId>emcsecurity</userId>
  </mgmt_user_info>
  <mgmt_user_info>
    <is_external_group>false</is_external_group>
    <isSystemAdmin>true</isSystemAdmin>
    <isSystemMonitor>true</isSystemMonitor>
    <userId>lex</userId>
  </mgmt_user_info>
  <mgmt_user_info>
    <is_external_group>false</is_external_group>
    <isSystemAdmin>true</isSystemAdmin>
    <isSystemMonitor>true</isSystemMonitor>
    <userId>root</userId>
  </mgmt_user_info>


Per eseguire query su un utente specifico, inclusi account speciali come emcmonitor e emcservice, utilizzare la sintassi seguente:

Comando:

# svc_rest_cmd -u root -p ChangeMe /vdc/users/<username>

Esempio:

admin@ecsnode1:~> svc_rest_cmd -u root -p ChangeMe /vdc/users/emcmonitor
svc_rest_cmd 1.0.10

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mgmt_user_info>
  <is_external_group>false</is_external_group>
  <is_locked>false</is_locked>
  <isSecurityAdmin>false</isSecurityAdmin>
  <isSystemAdmin>false</isSystemAdmin>
  <isSystemMonitor>true</isSystemMonitor>
  <userId>emcmonitor</userId>
</mgmt_user_info>
  1. Creare un file con la password SystemAdmin e SystemMonitor l'accesso che l'utente deve avere. In questo esempio, l'utente che deve essere reimpostato è stato emcmonitor:
Comandi:
# vi /file/path
  • Premere il tasto INS.
  • Incollare i seguenti elementi nella sessione CLI: (Fare clic con il pulsante destro del mouse come i tasti di scelta rapida Ctrl+V di Windows)
<mgmt_user_info_update>
   <password>ChangeMe</password>
   <isSystemAdmin>false</isSystemAdmin>
   <isSystemMonitor>true</isSystemMonitor>
</mgmt_user_info_update>
  • Premere Esc
  • digitare :wq!
Esempio:
admin@ecsnode1:~> vi /tmp/emcmonitor
<mgmt_user_info_update>
   <password>ChangeMe</password>
   <isSystemAdmin>false</isSystemAdmin>
   <isSystemMonitor>true</isSystemMonitor>
</mgmt_user_info_update>
  1. Verificare il contenuto del file:
Comando:
# cat /file/path
Esempio:
admin@ecsnode1:~> cat /tmp/emcmonitor
<mgmt_user_info_update>
   <password>ChangeMe</password>
   <isSystemAdmin>false</isSystemAdmin>
   <isSystemMonitor>true</isSystemMonitor>
</mgmt_user_info_update>
NOTE:  Make sure that the SystemAdmin and SystemMonitor is correct, this will change the user abilities.  Match this with the output from step 1.
  1. Reimpostare la password con quanto segue svc_rest_cmd:

Comando:

# svc_rest_cmd PUT -u root -p ChangeMe -xml -file <file_name> /vdc/users/<user_to_change>
Esempio:
#svc_rest_cmd PUT -u root -p ChangeMe -xml -file /tmp/emcmonitor /vdc/users/emcmonitor
svc_rest_cmd 1.0.10


Ora l'utente può accedere con la password definita nel file creato nel passaggio 2.


Per un account bloccato, per sbloccare e modificare la password su un account con API REST:
Questo metodo funziona quando nel VDC è abilitata la funzione Password Rules e l'attributo dell'account utente viene visualizzato is_lockedtrue:

admin@ecsnode1:~> svc_rest_cmd -u root -p ChangeMe /vdc/users/emcservice
svc_rest_cmd 1.0.10

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mgmt_user_info>
  <is_external_group>false</is_external_group>
  <is_locked>true</is_locked>
  <isSecurityAdmin>false</isSecurityAdmin>
  <isSystemAdmin>false</isSystemAdmin>
  <isSystemMonitor>true</isSystemMonitor>
  <userId>emcservice</userId>
</mgmt_user_info>
  1. Creare un file con i seguenti contenuti. Se l'opzione Password Rules è abilitata, la password impostata deve soddisfare tutti i criteri impostati da Password Rules.
<mgmt_user_info_unlock>
   <password>ChangeMe</password>
</mgmt_user_info_unlock>
  1. Sbloccare e reimpostare la password con il comando seguente svc_rest_cmd:

Comando:

# svc_rest_cmd PUT -u root -p ChangeMe -xml -file <file_name> /vdc/users/<user_to_change>/unlock

Esempio:

 #svc_rest_cmd PUT -u root -p ChangeMe -xml -file /tmp/emcservice /vdc/users/emcservice/unlock
svc_rest_cmd 1.0.10


Non è previsto alcun output. Controllare l'account utente e verificare che il valore is_locked sia impostato su false:

admin@ecsnode1:~> svc_rest_cmd -u root -p ChangeMe /vdc/users/emcservice
svc_rest_cmd 1.0.10

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mgmt_user_info>
  <is_external_group>false</is_external_group>
  <is_locked>false</is_locked>
  <isSecurityAdmin>false</isSecurityAdmin>
  <isSystemAdmin>false</isSystemAdmin>
  <isSystemMonitor>true</isSystemMonitor>
  <userId>emcservice</userId>
</mgmt_user_info>

Additional Information

È necessaria la password root o l'interfaccia utente. Se il cliente dispone di una password non predefinita, chiedergli se desidera passare a quella predefinita. Reimpostare la password utente e reimpostarla nuovamente una volta completata la manutenzione. In questo modo la password root personalizzata non viene visualizzata nella cronologia.

Affected Products

ECS Appliance

Products

ECS Appliance, ECS Appliance Gen 1, ECS Appliance Gen 2, ECS Appliance Gen 3, ECS Appliance Hardware Gen3 EX300, ECS Appliance Hardware Gen3 EX3000, ECS Appliance Hardware Gen1 U-Series, ECS Appliance Hardware Gen1 C-Series , ECS Appliance Hardware Gen2 C-Series, ECS Appliance Hardware Gen2 D-Series, ECS Appliance Hardware Gen2 U-Series, ECS Appliance Hardware Gen3 EX500, ECS Appliance Hardware Series, ECS Appliance Software with Encryption, ECS Appliance Software without Encryption ...
Article Properties
Article Number: 000019704
Article Type: How To
Last Modified: 14 Aug 2025
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.