About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
iscsiadm: initiator reported error (24 - iSCSI login failed due to authorization failure) means a Linux iSCSI initiator reached the target and the target refused the login. The causes to check are a CHAP username or secret that differs from the array, mutual CHAP set on only one side, or an initiator name the array does not allow. Compare the node record with the array before you change anything: the iscsid.conf file says a value for a specific node is set with the iscsiadm --mode node --op command.
What the error means
The iscsiadm manual lists exit status 24 as ISCSI_ERR_LOGIN_AUTH_FAILED - login failed due to authorization failure. The message text comes from the open-iscsi source code (release 2.1.8): file iscsi_err.c holds the entry iSCSI login failed due to authorization failure for code 24, and prints it with the format "initiator reported error (%d - %s)", where %d is the code and %s is that entry. The iscsiadm: prefix is the program name, added by log.c. Check the code in the shell with echo $? straight after the command.
The iscsid log lines also come from the source code (release 2.1.8, file login.c). When the target answers a login with an authentication-failed status, the format is "Login failed to authenticate with target %s". When authentication fails inside the CHAP exchange, the format is "Login authentication failed with target %s", and in one variant "Login authentication failed with target %s, %s". The first %s is the target name.
RFC 7143 defines two login rejections that match this fault. In the open-iscsi source (initiator.c, release 2.1.8) the statuses ISCSI_LOGIN_STATUS_AUTH_FAILED and ISCSI_LOGIN_STATUS_TGT_FORBIDDEN both return the same internal result, CONN_LOGIN_AUTH_FAILED, which iscsiadm reports as exit status 24. The RFC statuses are: Status 0201, "Authentication failure": "The initiator could not be successfully authenticated or target authentication is not supported." Status 0202, "Authorization failure": "The initiator is not allowed access to the given target." So there are two things to check: the credentials, and the target's rule about which initiators may log in.
The settings that matter are in the node record. The open-iscsi manual says it "uses the term node to refer to a portal on a target". The iscsid.conf header says: "To set any of these values for a specific node/session run the iscsiadm --mode node --op command for the value." Compare the record itself with the file.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| CHAP username or secret in the node record differs from the array | Login rejected; the record shows an old or empty username | Show the node record and compare each value with the array |
iscsid.conf and the node record differ |
The file has the right credentials, the record does not | Compare iscsid.conf with the node record; they differ |
| Incoming pair set, outgoing pair empty | iscsid warns CHAP configuration has incoming authentication credentials but has no outgoing credentials configured. and does not log in |
The record has username_in and password_in but empty username and password |
| Mutual CHAP set on one side only | Login rejected | The record has username_in and password_in but the array has no matching reverse secret, or the reverse |
| Discovery works but login fails, or the reverse | Discovery uses discovery.sendtargets.auth.*, login uses node.session.auth.* |
Check which command returns 24 and read the matching settings |
| The initiator name is not allowed on the array | CHAP matches, still rejected | The name in /etc/iscsi/initiatorname.iscsi is not in the array's list of allowed initiators |
| CHAP algorithm not supported by the array | chap_algs lists values the array does not accept |
Read node.session.auth.chap_algs and the array's supported algorithms |
Prove the cause before changing anything
These commands only read. Replace the target name and portal with yours.
1. The record, with and without secrets.
iscsiadm --mode node --targetname iqn.2001-05.com.example:array1.vol1 --portal 192.0.2.50:3260
This is the manual's "Display all data for a given node record" form. Secrets are masked. The manual says -S (--show) shows masked values such as the CHAP secret and is valid for node and session mode. Read these fields: node.session.auth.authmethod, node.session.auth.username, node.session.auth.password, node.session.auth.username_in, node.session.auth.password_in and node.session.auth.chap_algs.
2. The discovery record, if discovery is what fails.
iscsiadm --mode discoverydb --type sendtargets --portal 192.0.2.50:3260 --op show
The README says op=SHOW displays the discovery record.
3. The file settings. Read /etc/iscsi/iscsid.conf and compare the CHAP lines with the record. A difference is something to correct in the record with --op update, as the iscsid.conf header describes.
4. The initiator name. Read /etc/iscsi/initiatorname.iscsi. Compare the name with the array's list of allowed initiators, in the array's own management page.
5. The log. Search the system log for these strings from the source code (release 2.1.8):
Login failed to authenticate with targetandLogin authentication failed with target, fromlogin.c.login rejected: Initiator failed authentication with target, frominitiator.c. This is the status 0201 case. The line beginssession %d, where%dis the session number, so search for the text after it.login rejected: initiator failed authorization with target, frominitiator.c. This is the status 0202 case, for example an initiator name the array does not allow.
Any of these tells you the target answered and refused.
6. Existing sessions.
iscsiadm --mode session
After steps 1 to 4, a good result is a record whose username and secret equal the array's CHAP entry for this initiator, a name the array lists, and an algorithm both sides accept.
Fix
Wrong CHAP values in the node record
The manual's -o update, -n name and -v value options change a field in a node record. First save the record with its secrets, to a file in root's home directory:
iscsiadm --mode node --targetname iqn.2001-05.com.example:array1.vol1 --portal 192.0.2.50:3260 -S > /root/node-array1-vol1-before-2026-11-22.txt
Risk: the next commands overwrite the CHAP username and secret stored in one node record, and the saved file contains the old secret in clear text.
Update the fields that differ from the array, one command per field:
iscsiadm --mode node --targetname iqn.2001-05.com.example:array1.vol1 --portal 192.0.2.50:3260 --op update --name node.session.auth.username --value NEW_USERNAME
iscsiadm --mode node --targetname iqn.2001-05.com.example:array1.vol1 --portal 192.0.2.50:3260 --op update --name node.session.auth.password --value NEW_SECRET
Use the same form for node.session.auth.username_in and node.session.auth.password_in if the array uses mutual CHAP. Read the record again to confirm the fields.
To back out, run the same update commands with the old values from the saved file, then read the record again.
Mutual CHAP on one side only
Mutual CHAP needs the initiator's incoming pair (username_in, password_in) to match the secret the array uses to authenticate itself, and the outgoing pair to match the array's entry for this initiator. The iscsid source code (release 2.1.8, file initiator_common.c) refuses a configuration that has incoming credentials and no outgoing ones, with the warning text CHAP configuration has incoming authentication credentials but has no outgoing credentials configured.
First save the record with its secrets, so the saved file holds the current values of all four fields:
iscsiadm --mode node --targetname iqn.2001-05.com.example:array1.vol1 --portal 192.0.2.50:3260 -S > /root/node-array1-vol1-mutual-before-2026-11-22.txt
Risk: the next commands overwrite the CHAP pairs stored in one node record, and the saved file contains the old secrets in clear text.
Set the outgoing pair (node.session.auth.username, node.session.auth.password) and the incoming pair (node.session.auth.username_in, node.session.auth.password_in) to the values the array holds, with the --op update --name ... --value ... form shown above, one command per field. Do not leave only the incoming pair set: the source code refuses that configuration. Changing the array is a job for the array's owner.
To back out, run the same update commands with the old values from the saved file, then read the record again.
Initiator name not allowed
First note the array's current list of allowed initiators for that volume, for example in a screenshot or an export from the array's own management page.
Risk: the next change grants this server access to the volume on the array.
Add the exact name from /etc/iscsi/initiatorname.iscsi to the array's list of allowed initiators for that volume. Make the change on the array, not in the file.
To undo it, remove the entry from the array's list again, so that the list matches what you noted.
Algorithm mismatch
iscsid.conf describes node.session.auth.chap_algs as a comma-separated list with the most preferred algorithm first. It says "Valid values are MD5, SHA1, SHA256, and SHA3-256." and "The default is MD5." The list can be changed in the node record. First save the record:
iscsiadm --mode node --targetname iqn.2001-05.com.example:array1.vol1 --portal 192.0.2.50:3260 -S > /root/node-array1-vol1-algs-before-2026-11-22.txt
Risk: the next command changes the CHAP algorithm list stored in one node record, and a list the array does not accept makes every later login fail.
If the array accepts only another algorithm, change the list. Use a list from the valid values that includes an algorithm the array accepts, for example:
iscsiadm --mode node --targetname iqn.2001-05.com.example:array1.vol1 --portal 192.0.2.50:3260 --op update --name node.session.auth.chap_algs --value SHA256,MD5
To back out, run the same command with the node.session.auth.chap_algs value from the saved file, then read the record again.
Try the login
A login can be tried once the record matches the array. First save the session list:
iscsiadm --mode session > /root/sessions-before-2026-11-22.txt
Disruptive step: the next command logs in to the target and attaches its volumes to this server as new disks. Do it only when the server is meant to use that volume. Try the login:
iscsiadm --mode node --targetname iqn.2001-05.com.example:array1.vol1 --portal 192.0.2.50:3260 --login
To undo it, read the saved session list first. Log out of the record only if the saved list shows no session to this target before the login. Do not log out while a filesystem on the volume is mounted or in use. The manual documents the logout as --logout:
iscsiadm --mode node --targetname iqn.2001-05.com.example:array1.vol1 --portal 192.0.2.50:3260 --logout
Example (illustrative): An administrator changes db01's CHAP secret on the array and edits node.session.auth.password in /etc/iscsi/iscsid.conf. Login to 192.0.2.50:3260 still returns initiator reported error (24 - iSCSI login failed due to authorization failure). The record shown with -S holds the old secret. Once the record is saved and node.session.auth.password is updated with --op update, the login succeeds.
Confirm the fix
- The login command returns without error, and
echo $?prints 0. iscsiadm --mode sessionlists the session to the target.- The system log no longer shows
Login failed to authenticate with target,Login authentication failed with target,login rejected: Initiator failed authentication with targetorlogin rejected: initiator failed authorization with targetfor it. - The new disk appears on the server. If it does not, the guide titled "New disk added to a Linux VM on VMware but it does not appear: rescan the SCSI host first" explains the rescan.
What to watch afterwards
- Record changes after any CHAP secret rotation on the array. Update each node record for every portal and every target of that array.
- Keep
iscsid.confand the existing records consistent, because the iscsid.conf header says per-node values are set withiscsiadm --mode node --op. - Any rise in
Login authentication failedlines in the log. - Saved files that contain secrets: remove them when the work is complete, with a plain
rmof the one file.
Read next
Related articles you may want next.
- VMwareESXi iSCSI login rejected: CHAP or mutual CHAP does not match the arrayESXi logs 'Login failed to authenticate with target' and 0x0201. Compare adapter and per-target CHAP with the array, fix mutual CHAP, then re-login.Read article
- VMwareSoftware iSCSI Paths Dead After a NIC Change: Check the 1:1 Uplink Policy on Bound PortsESXi 8.0 software iSCSI paths dead after a NIC change? For same-subnet port binding, record each bound port's uplinks, logins, sessions and paths before changing anything.Read article
- VMwareNew disk added to a Linux VM on VMware but it does not appear: rescan the SCSI host firstNew disk in a Linux VM in vSphere but lsblk does not list it? Rescan the SCSI hosts, check the controller, then mount by UUID with nofail.Read article
Risks and limits
- These commands have not been run or lab-tested.
- The commands and messages follow open-iscsi 2.1.8 documentation. Other versions can print different text.
- Exit status 24 covers both RFC 7143 login rejections 0201 and 0202; the exit status alone does not say which one the target sent.
- A secret typed on a command line follows your site's rules for handling secrets; use the method your site allows.
Sources
- iscsiadm(8) — open-iscsi 2.1.8 manual page, Debian bookworm, 2022-10-19, accessed 22 November 2026
- iscsid.conf at tag 2.1.8 — open-iscsi project, GitHub release tag 2.1.8, no date shown, accessed 22 November 2026
- README at tag 2.1.8 — open-iscsi project, GitHub release tag 2.1.8, header dated Jun 6, 2022, accessed 22 November 2026
- initiator.c at tag 2.1.8 — open-iscsi project source code, GitHub release tag 2.1.8, no date shown, accessed 22 November 2026
- log.c at tag 2.1.8 — open-iscsi project source code, GitHub release tag 2.1.8, no date shown, accessed 22 November 2026
- iscsi_err.c at tag 2.1.8 — open-iscsi project source code, GitHub release tag 2.1.8, no date shown, accessed 22 November 2026
- login.c at tag 2.1.8 — open-iscsi project source code, GitHub release tag 2.1.8, no date shown, accessed 22 November 2026
- initiator_common.c at tag 2.1.8 — open-iscsi project source code, GitHub release tag 2.1.8, no date shown, accessed 22 November 2026
- RFC 7143: Internet Small Computer System Interface (iSCSI) Protocol (Consolidated) — IETF, April 2014, accessed 22 November 2026
This article was originally published on .