System Administration Guide: Devices and File Systems

ProcedureHow to Configure CHAP Authentication for Your iSCSI Target

This procedure assumes that you are logged in to the local system that contains the iSCSI targets.

  1. Become superuser.

  2. Set the CHAP secret name for the target.

    A convention is to use the host name for the secret name. For example:


    target# iscsitadm modify admin -H stormpike
    
  3. Specify the CHAP secret.

    The CHAP secret must be between 12 and 16 characters. For example:


    target# iscsitadm modify admin -C
    Enter secret: xxxxxx
    Re-enter secret: xxxxxx
  4. Create an initiator object that will be associated with one or more targets.

    This step is done so that you can associate a friendly name (normally the host name, in this case monster620) with the IQN value, instead of typing it in every time. For example:


    # iscsitadm create initiator -n iqn.1986-03.com.sun: 01:00e081553307.4399f40e monster620
    
  5. Provide the same CHAP name that was used on the initiator.

    This name can be different from the friendly name that was used for the initiator object. For example:


    target# iscsitadm modify initiator -H monster620 monster620
    
  6. Use the same CHAP secret that was used on the initiator.

    For example:


    target# iscsitadm modify initiator -C monster620
    Enter secret: xxxxxx
    Re-enter secret: xxxxxx
  7. Associate the initiator object with one or more targets.

    For example:


    target# iscsitadm modify target -l monster620 sandbox