eg)
If
option : user
shell variable name : wadm_user
If
option : key-type
shell variable name :
wadm_key_type
How ???
1) create rcfile
.wadmrc to
set the shell variables
2) use set /unset commands within the wadm shell
Note: Options supplied
directly on the command line will take precedence over
the shell variables.
For example if you want to execute the CLI
create-selfsigned-cert:
CLI Usage:
create-selfsigned-cert [--echo=true] [--prompt=false]
[--verbose=true] [--token=name] [--org-unit=unit] [--locality=place]
[--state=name]
[--validity=num of months] [--org=org] [--country=name]
[--key-type=(rsa|ecc)]
[--key-size=size] [--curve=curvename] --config=name --server-name=name
--nickname=nickname
If you want the org and country same for
all the certificates you create, your rcfile should look like this:
<server-root>/bin>> vi
.wadmrc
set wadm_password adminadmin
set wadm_org SUN
set wadm_country US
--------------------------------------------------------------------------------------------------------------------------------
Now, to execute the CLI, enter the wadm prompt as:
./wadm --user=admin --port=8888 --rcfile=.wadmrc
And execute CLI:
wadm>create-selfsigned-cert --config=config1 --server-name=server1
--nickname=cert1
wadm>create-selfsigned-cert --config=config1 --server-name=server2
--nickname=cert2
You need not specify the options org and country again. These
certificates will
be created with org=SUN and country=US. This can be verified using
certutil or viewed from the Administration GUI.
<server-install-root>/bin# ./certutil -L -d
<server-install-root>/admin-server/config-store/config1/config -n
cert1
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
00:82:7e:c1:aa
Signature Algorithm: PKCS #1
MD5 With RSA Encryption
Issuer: "CN=server1,
O=SUN,C=US"
Validity:
Not
Before: Wed May 17 06:30:13 2006
Not
After : Thu Aug 17 06:30:13 2006
Subject: "CN=server1,
O=SUN,C=US"
Subject Public Key Info:
Public Key Algorithm: PKCS #1 RSA Encryption
.
.
.
.
.
.
.
wadm>set wadm_org JWS
wadm>create-selfsigned-cert --config=config1 --server-name=server3
--nickname=cert3
Here, cert3 gets created with org=JWS and not SUN. Use unset wadm_org
to remove this setting.
wadm>create-selfsigned-cert --config=config1 --server-name=server4
--org=WS --nickname=cert4
Here, cert4 gets created with org=WS.
ie, Precedence is in the following order :
Option in the command itself >>> set/unset commands in
wadm shell >>> rcfile
To
know more about SJSWS7.0 Administration, see I.K's blog
Posted by Link buy cialis online. on April 16, 2007 at 08:54 AM IST #