[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Handle-info] Authenticate in a batch file for CLI use



I am trying to figure out how to run batch files from the command line.  I can run the from the GUI just fine, but we are looking for a way to script batch file processing.

 

So far I have tried the following methods:

 

CREATE 10176/test0001

100 HS_ADMIN 86400 1110 ADMIN 300:111111111111:0.NA/10176

300 HS_PUBKEY 86400 1110 FILE /usr/local/hs/damocles/admpriv.bin

1 URL 86400 1110 UTF8 http://www.coalliance.org

 

And

 

AUTHENTICATE PUBKEY:300:0.NA/10176

/usr/local/hs/damocles/admpriv.bin

 

CREATE 10176/test0001

100 HS_ADMIN 86400 1110 ADMIN 300:111111111111:0.NA/10176

1 URL 86400 1110 UTF8 http://www.coalliance.org

 

Both give me something like:

 

Batch(authtest2.txt) process started ...

Batch process prints log on stdout ...

Start Time: Thu Feb 10 14:01:12 MST 2011

  sending HDL-UDP request (version=2.1; oc=1; rc=0; snId=0 caCrt noAuth 0.NA/10176 [HS_SITE, HS_SERV, HS_NAMESPACE, ] [ ]) to 218.241.99.150:2641

  sending HDL-TCP request (version=2.2; oc=400; rc=0; snId=0 crt caCrt noAuth adm /) to 129.19.154.23:2641

    received HDL-TCP response: version=2.2; oc=400; rc=1; snId=2095 crt caCrt noAuth

  sending HDL-TCP request (version=2.1; oc=100; rc=0; snId=2095 caCrt encrypt noAuth adm 10176/test0001) to 129.19.154.23:2641

  sending HDL-HTTP request (version=2.1; oc=100; rc=0; snId=2095 caCrt encrypt noAuth adm 10176/test0001) to 129.19.154.23:8000

==>FAILURE[5]: create:10176/test0001: No authentication info provided

  sending HDL-TCP request (version=2.1; oc=100; rc=0; snId=2095 caCrt encrypt noAuth adm 10176/test0002) to 129.19.154.23:2641

  sending HDL-HTTP request (version=2.1; oc=100; rc=0; snId=2095 caCrt encrypt noAuth adm 10176/test0002) to 129.19.154.23:8000

==>FAILURE[9]: create:10176/test0002: No authentication info provided

Successes/Total Entries: 0/2

Batch File Lines: 9

Finish Time: Thu Feb 10 14:01:13 MST 2011

This batch took 1 seconds to complete at an average speed of 1.7714791851195748 operations/second

Batch process finished

 

I have confirmed that the path to the admpriv.bin file is correct, at least that is the file that is used when I authenticate via the GUI.

 

What am I doing wrong?

 

Thanks

 

Tim Donnelly

System/Network Administrator

Colorado Alliance of Research Libraries