NetWorker: 로컬 REST API 전용 사용자를 생성하는 방법
Summary: 다음 단계에 따라 REST API에 대한 NetWorker 사용자 계정을 생성할 수 있지만 NMC에 대한 액세스 권한은 없습니다. REST API 사용자는 사용자에게 할당된 NetWorker 역할에 따라 NWUI(NetWorker Web User Interface)에 액세스할 수 있습니다. NWUI 액세스는 NSR 사용자 그룹 에 따라 다릅니다. 이 그룹은 REST API 권한을 정의하는 데 사용되는 역할과 동일합니다. REST API 사용자 생성은 선택 사항이며 NetWorker Server에서 REST API 작업을 수행하기 위해 반드시 필요한 것은 아닙니다. ...
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
- NetWorker Server에서 루트 셸(Linux) 또는 관리자 명령 프롬프트(Windows)를 엽니다.
- 다음 명령 구문을 사용하여 REST API 사용자 계정을 생성합니다.
authc_mgmt -u Administrator -p 'NETWORKER_ADMINISTRATOR_PASSWORD' -e add-user -D user-name="RESTAPI_USERNAME" -D user-password='USER_PASSWORD' -D user-enabled
예:
[root@nsr ~]# authc_mgmt -u Administrator -p '!Password1' -e add-user -D user-name="RESTAPI" -D user-password='!Password1' -D user-enabled User RESTAPI is created successfully. [root@nsr ~]#
- REST API 사용자의 사용자 DN 을 가져옵니다.
authc_mgmt -u Administrator -p 'NETWORKER_ADMINISTRATOR_PASSWORD' -e find-all-users authc_mgmt -u Administrator -p 'NETWORKER_ADMINISTRATOR_PASSWORD' -e find-user -D user-id=USER-ID
예:
[root@nsr ~]# authc_mgmt -u Administrator -p '!Password1' -e find-all-users The query returns 7 records. User Id User Name 1000 administrator 1001 svc_nmc_nsr ... 1038 RESTAPI [root@nsr ~]# authc_mgmt -u Administrator -p '!Password1' -e find-user -D user-id=1038 User Id : 1038 User Name : RESTAPI User Domain : User First Name: User Last Name : User Email : User Details : User DN : cn=RESTAPI,cn=Users,dc=nsr,dc=amer,dc=lan User Enabled : true User Groups : []
- 사용자에게 NetWorker Server에 대한 사용 권한을 부여합니다.
NetWorker 관리자 권한의 경우 다음 명령을 실행합니다.
nsraddadmin -e cn=RESTAPI_USERNAME,cn=users,cn=NSR_SERVERNAME,dc=DOMAIN_VALUE1,dc=DOMAIN_VALUE2예:
[root@nsr ~]# nsraddadmin -e cn=RESTAPI,cn=users,cn=nsr,dc=amer,dc=lan 134751:nsraddadmin: Added role 'cn=RESTAPI,cn=users,cn=nsr,dc=amer,dc=lan' to the 'Security Administrators' user group. 134751:nsraddadmin: Added role 'cn=RESTAPI,cn=users,cn=nsr,dc=amer,dc=lan' to the 'Application Administrators' user group.
참고: 사용자에게 관리자 권한을 부여하지 않으려면 NSR 역할 중 하나의 사용자 필드에 사용자를 추가할 수 있습니다. 이 작업은 NMC(NetWorker Management Console), NWUI(NetWorker Web User Interface) 또는
nsradmin 명령 프롬프트:
구문: user=USERNAME,host=NSR_SERVERNAME
NetWorker Server의 운영자 사용자 그룹에 REST API 사용자를 추가하는 예:
[root@nsr ~]# nsradmin
NetWorker administration program.
Use the "help" command for help, "visual" for full-screen mode.
nsradmin> show name;comment
nsradmin> p type: nsr usergroup
name: Users;
comment: \
Members of this group can back up to and recover from NetWorker.;
name: Database Administrators;
comment: \
Members of this group are typically database administrators that can partially administer NetWorker.;
name: Database Operators;
comment: \
Members of this group are typically database operators that can operate NetWorker.;
name: Auditors;
comment: \
Members of this group can audit the NetWorker security logs.;
name: Operators;
comment: Members of this group can operate NetWorker.;
name: Application Administrators;
comment: \
Members of this group can perform the application administration of NetWorker.;
name: Security Administrators;
comment: \
Members of this group can administer the security settings of NetWorker.;
name: Monitors;
comment: \
Members of this group can monitor the NetWorker application.;
name: Archive Users;
comment: Members of this group can archive local data;
name: VMware FLR Users;
comment: \
Members of this group can perform VMware file level recovery operations from NetWorker.;
nsradmin> show
Will show all attributes
nsradmin> . type: nsr usergroup; name: operators
Current query set
nsradmin> update users: user=RESTAPI,host=nsr.amer.lan
users: user=RESTAPI,host=nsr.amer.lan;
Update? y
updated resource id 125.0.90.20.0.0.0.0.196.80.99.102.192.168.9.150(4)
nsradmin> show
Will show all attributes
nsradmin> print
type: NSR usergroup;
name: Operators;
comment: Members of this group can operate NetWorker.;
external roles: ;
users: user=RESTAPI,host=nsr.amer.lan;
privileges: Remote Access All Clients,
View Application Settings, Operate NetWorker,
Monitor NetWorker,
Operate Devices and Jukeboxes,
Recover Local Data, Recover Remote Data,
Backup Local Data, Backup Remote Data,
Archive Data;
nsradmin> q
[root@nsr ~]#
- 로컬 authc 인스턴스를 사용하여 NetWorker 인증 신뢰가 설정되었는지 확인합니다.
nsrauthtrust -H NSR_SERVERNAME -P 9090 nsraddadmin -H NSR_SERVERNAME -P 9090
- REST API는 다음을 사용하여 테스트할 수 있습니다.
curl -ik GET -u RESTAPI_USERNAME:'USERPASSWORD' -H "Content-Type: application/json" https://NSR_SERVERNAME:9090/nwrestapi/v3/global/
예:
[root@nsr ~]# curl -ik GET -u RESTAPI:'!Password1' -H "Content-Type: application/json" https://nsr.amer.lan:9090/nwrestapi/v3/global/
curl: (6) Could not resolve host: GET
HTTP/1.1 200
Content-Security-Policy: frame-ancestors 'none';script-src' 'self';object-src 'self'
Strict-Transport-Security: max-age=31536000
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Date: Thu, 11 Jul 2024 18:22:58 GMT
Cache-Control: no-cache,no-store,must-revalidate
Pragma: no-cache
Expires: 0
Content-Type: application/json
Transfer-Encoding: chunked
Server: NSR SERVICES for Authentication
{"links":[{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/alerts","title":"List of alert messages"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/auditlogconfig","title":"Audit log configuration"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/auditlogconfigs","title":"Audit log configurations"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/backups","title":"List of backups"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/clients","title":"List of clients"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/cloudboostappliances","title":"List of cloudboost appliances"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/datadomainsystems","title":"List of data domain systems"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/dddevicereplication","title":"DD device replication"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/devices","title":"List of storage devices"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/directives","title":"List of backup directives"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/inspect","title":"Inspect remote/local server"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/jobgroups","title":"List of job groups"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/jobindications","title":"List of job indications"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/jobs","title":"List of jobs"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/jukeboxes","title":"List of jukeboxes"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/labels","title":"List of volume label templates"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/licenseconfig","title":"Server license configuration"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/licenses","title":"List of license templates"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/lockbox","title":"Lockbox resource"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/mediaconfig","title":"Server media configuration"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/mobilestorageunits","title":"Mobile storage units"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/nasdevices","title":"List of NAS devices"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/notifications","title":"List of notification settings"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/nsrcloneconfig","title":"NSR Clone Configuration"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/pools","title":"List of pools"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/probes","title":"List of probes"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/protectiongroups","title":"List of protection groups"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/protectionpolicies","title":"List of protection policies"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/recoverapps","title":"List of recovery applications"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/recovers","title":"List of recover resources"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/rules","title":"List of rules"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/schedules","title":"List of schedules"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/securityconfig","title":"Server security configuration"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/serverconfig","title":"Server configuration"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/servermessages","title":"List of server messages"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/serverstatistics","title":"Server statistics"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/sessions","title":"List of save/recover sessions"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/storagenodes","title":"List of storage nodes"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/tenants","title":"Restricted data zone protection"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/timepolicies","title":"List of Time Policies"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/unconfiguredlibraries","title":"List of unconfigured libraries"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/usergroups","title":"List of user groups"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/vmware","title":"View of VMware objects"},{"href":"https://nsr.amer.lan:9090/nwrestapi/v3/global/volumes","title":"List of volumes"}]}[root@nsr ~]#
참고: 일부 Windows 시스템에는
curl 설치되고 명령은 Windows 명령 프롬프트에서도 실행할 수 있습니다. REST URL은 웹 브라우저 내에서 지정할 수도 있습니다.
REST API 사용자 암호가 90일(기본값)마다 만료되지 않도록 하려면 다음을 따르십시오. NetWorker: NetWorker 계정의
암호 만료를 비활성화하는 방법NetWorker Server가 여러 개 있는 경우 각 서버에서 이 프로세스를 반복하여 로컬 REST API 사용자의 데이터 존 전체에 대한 정합성이 유지되도록 합니다. 사용자가 생성된 단일 NetWorker Authentication Server를 사용하는 경우 적절한 인증을 위해 REST API 함수에 헤더를 추가합니다. 헤더에 정의된 NetWorker Authentication Server를 사용하여 인증하도록 REST API 함수에 지시합니다. 자세한 내용은 다음을 참조하십시오. NetWorker REST API: RESTAPI 요청을 처리할 때 원격 AUTHC 서버를 사용하는 방법
Affected Products
NetWorkerProducts
NetWorkerArticle Properties
Article Number: 000020534
Article Type: How To
Last Modified: 12 Jun 2025
Version: 8
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.