Skip to content

Commit 28a390d

Browse files
committed
Remove modification of auth.conf from makeEAadmin.pl
"bpnbaz -AddUser" is sufficient to grant a user administrator privileges.
1 parent a4596fe commit 28a390d

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

snippets/perl/README_makeEAadmin.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ What is This?
1818
This script is provided as a demonstration of how to create a non-root admin account to be used for the
1919
purpose of invoking the NetBackup REST APIs.
2020

21-
This deomonstration is written as a perl script and uses the perl module “UserAgent” to invoke https
21+
This demonstration is written as a perl script and uses the perl module “UserAgent” to invoke https
2222
requests to the NetBackup REST APIs.
2323

2424

@@ -31,7 +31,7 @@ PERl modules required
3131
++ JSON
3232
++ HTTP
3333

34-
This utility is written in perl, and is meant to be run directly on the NetBackup master server. The caller of this utility must have sufficient priveleges to execute a NetBackup command line on the Master. Although
34+
This utility is written in perl, and is meant to be run directly on the NetBackup master server. The caller of this utility must have sufficient privileges to execute a NetBackup command line on the Master. Although
3535
it has been developed and tested on RedHat Linux, it should be compatible with any non-windows NetBackup
3636
master server.
3737

@@ -46,7 +46,7 @@ Overview:
4646
This script provides an example of how to login to the NetBackup Rest APIs and get a "token" to be used in
4747
subsequent REST API calls. In this demonstration, the utility creates a new "fictional user" in NetBackup
4848
using the mechanisms described by the "Enhanced Auditing" mechanism in NetBackup. At the time of this writing,
49-
NetBackup 8.1.1 will accept root, local/administrator and any Enhanced Auditing user as a fully-priveleged
49+
NetBackup 8.1.1 will accept root, local/administrator and any Enhanced Auditing user as a fully-privileged
5050
REST API user.
5151

5252
Once an administrator is created, the script demonstrates how to "login" to the REST API services and get
@@ -57,13 +57,13 @@ Outline:
5757
---------------------------------------------------
5858
Setup: First a fictional user is added to "vx domain" using standard NetBackup command lines (bpnbat) for
5959
the purposes of testing. Next, this new fictional user is added to the list of non-root administrators
60-
in the Enhanced Auditing configuration, making this account pseudo root priveleged for the purposes of
60+
in the Enhanced Auditing configuration, making this account pseudo root privileged for the purposes of
6161
NetBackup administration.
6262

63-
APIs: The new administrator user is logged into the REST APIs and recieves a session token. This token is
63+
APIs: The new administrator user is logged into the REST APIs and receives a session token. This token is
6464
captured and included in each subsequent API call as the contents of the standard http "Authorization"
6565
header. The Front End Data report is run as an example of this. Finally the user is logged out of
66-
NetBackup REST which ends the session associated with that toekn.
66+
NetBackup REST which ends the session associated with that token.
6767

6868
Cleanup: Remove our fictional user from the Enhanced Auditing users list and remove the user account
6969
from the vx domain.

snippets/perl/makeEAadmin.pl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@
3232
print "Granting VxSS user administrator privileges...\n\n";
3333
system q["/usr/openv/netbackup/bin/admincmd/bpnbaz" -AddUser vx:vx:testuser];
3434

35-
print "Add the new user to the EA user list...\n\n";
36-
my $auth_file = '/usr/openv/java/auth.conf';
37-
open(my $fh, '>>', $auth_file) or die "Could not open auth.conf";
38-
say $fh "testuser ADMIN=All JBP=ALL";
39-
close $fh;
40-
4135
print "Restarting services...";
4236
system q["/usr/openv/netbackup/bin/bp.kill_all"];
4337
system q["/usr/openv/netbackup/bin/bp.start_all"];
@@ -85,7 +79,7 @@
8579
print "**************************************************************";
8680
print "\n\n Making Get Request to Catalog/FrontendData with token \n\n";
8781
if ($response->is_success) {
88-
print "/Catalog/frontenddata request was succesful \n\n";
82+
print "/Catalog/frontenddata request was successful \n\n";
8983

9084
$data = decode_json($response->content);
9185
my $pretty = JSON->new->pretty->encode($data);
@@ -109,7 +103,7 @@
109103
print "**************************************************************";
110104
print "\n\n Making Get Request to list all jobs \n\n";
111105
if ($response->is_success) {
112-
print "List jobs request was succesful \n\n";
106+
print "List jobs request was successful \n\n";
113107

114108
$data = decode_json($response->content);
115109
my $pretty = JSON->new->pretty->encode($data);

0 commit comments

Comments
 (0)