You can set up either bidirectional or unidirectional CHAP authentication. This procedure assumes that you are logged in to the local system that contains the iSCSI targets.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.4.
target# itadm modify-target -a chap target-iqn
target# itadm create-initiator -s initiator-iqn Enter CHAP secret: ************ Re-enter secret: ************
target# itadm modify-initiator -u initiator-CHAP-name initiator-iqn
This step completes the setup of unidirectional CHAP authentication. Continue with the remaining steps if you want to set up bidirectional CHAP authentication.
target# itadm modify-target -s target-iqn Enter CHAP secret: ************ Re-enter secret: ************
By default, the target's CHAP name is set to the target node name (iqn). If the target uses a custom name, set the CHAP name that identifies the target.
target# itadm modify-target -u target-CHAP-name target-iqn