iSCSI initiator does not discover iSCSI target when TCP/IP is working

  • 7018427
  • 29-Dec-2016
  • 22-Feb-2017

Environment

SUSE Linux Enterprise Server 11 Service Pack 3 (SLES 11 SP3)
SUSE Linux Enterprise Server 11 Service Pack 4 (SLES 11 SP4)

Situation

iSCSI initiator may work from other hosts.  When attempting to discover LUNs on an iSCSI target host, no results are returned using both YaST and iscsiadm.

Resolution

Run a whoami to verify that the username 'root' is returned:
hostname:~ # whoami

If this command returns with any username other than root, move this other UID 0 user below the root user line in /etc/passwd .

This user may also be assigned a different UID or deleted altogether, depending on the environment.

Any lines with a UID of 0 in /etc/passwd can be printed with this awk script:
hostname:~ # awk -F: '$3 ~ /^0$/' /etc/passwd

Cause

One or more users (other than the root user) in the /etc/passwd file have a UID of 0. 

Additional Information

UID 0 is the ID used for the root user. Conflicts or unexpected behavior may occur if any other user is set up with UID 0 and placed above (before) the root user in the /etc/passwd file.  Except in niche cases, using a UID of 0 for any user other than root is generally considered bad practice and should not be set up without a valid reason.

To modify the UID of an example user, tim, to a UID of 2345, use this command:
hostname:~ # usermod -u 2345 tim
To delete this user, instead, run this command:
hostname:~ # deluser tim