Use the lsiscsiauth command to list the Challenge Handshake Authentication Protocol (CHAP) secret that is configured for authenticating an entity to the system.
lsiscsiauth -filtervalue "name=md*"
For more information about filtering attributes, see Attributes of the -filtervalue parameters.
This command lists the CHAP secret that is configured for authenticating an entity to the system. The command also displays the configured iSCSI authentication method. The iscsi_auth_method field can have values of none or chap.
When you create an iSCSI host by using the mkhost command with the iscsiname parameter, the host is initially configured with the authentication method as none, and no CHAP secret is set. To set a CHAP secret for authenticating the iSCSI host with the system, use the chhost command with the chapsecret parameter.
Attribute | Description |
---|---|
type | Indicates the iSCSI system type. |
id | Indicates the iSCSI system ID. |
name | Indicates the iSCSI system name. |
iscsi_auth_method | Indicates the iSCSI authentication method. |
iscsi_chap_secret | Indicates whether an iSCSI CHAP secret exists. |
cluster_iscsi_auth_method | Indicates clustered system iSCSI authentication method. |
cluster_iscsi_chap_secret | Indicates the clustered system iSCSI configured CHAP secret. |
iscsiusername | Indicates the iSCSI user name. |
lsiscsiauth
The following output is displayed:
type id name iscsi_auth_method iscsi_chap_secret cluster_iscsi_auth_method cluster_iscsi_chap_secret host 0 mchost20 none none host 1 mchost30 none none host 2 mchost200 none none host 3 mchost40 none none host 4 mchost240 none none host 5 mchost170 none none host 6 mchost120 none none host 7 mchost60 none none host 8 mchost180 none none host 9 mchost13 none none host 10 newhost none none
lsiscsiauth -iscsiusername
The following output is displayed:
type id name iscsi_auth_method iscsiusername iscsi_chap_secret host 0 host0 chap rhel_host1 rhel_secret
iscsiusername
The following output is displayed:
type id name iscsi_auth_method iscsiusername iscsi_chap_secret host 0 host0 chap - rhel_secret