diff --git a/django/contrib/auth/management/commands/createsuperuser.py b/django/contrib/auth/management/commands/createsuperuser.py
index de0b467..b352ae8 100644
--- a/django/contrib/auth/management/commands/createsuperuser.py
+++ b/django/contrib/auth/management/commands/createsuperuser.py
@@ -88,7 +88,7 @@ class Command(BaseCommand):
                 verbose_field_name = self.username_field.verbose_name
                 while username is None:
                     if not username:
-                        input_msg = capfirst(verbose_field_name)
+                        input_msg = capfirst(verbose_field_name) + ' (%s.%s)' % (self.username_field.rel.to._meta.object_name, self.username_field.rel.field_name) if self.username_field.rel else ''
                         if default_username:
                             input_msg = "%s (leave blank to use '%s')" % (
                                 input_msg, default_username)
diff --git a/django/contrib/auth/tests/custom_user.py b/django/contrib/auth/tests/custom_user.py
index cfa998a..77e8477 100644
--- a/django/contrib/auth/tests/custom_user.py
+++ b/django/contrib/auth/tests/custom_user.py
@@ -40,7 +40,7 @@ class CustomUserManager(BaseUserManager):
 
 class CustomUserWithFKManager(BaseUserManager):
     def create_superuser(self, username, email, group, password):
-        user = self.model(username=username, email_id=email, group_id=group)
+        user = self.model(username_id=username, email_id=email, group_id=group)
         user.set_password(password)
         user.save(using=self._db)
         return user
@@ -96,8 +96,8 @@ class CustomUser(AbstractBaseUser):
 
 
 class CustomUserWithFK(AbstractBaseUser):
-    username = models.CharField(max_length=30, unique=True)
-    email = models.ForeignKey(Email, to_field='email')
+    username = models.ForeignKey(Email, related_name='primary')
+    email = models.ForeignKey(Email, to_field='email', related_name='secondary')
     group = models.ForeignKey(Group)
 
     custom_objects = CustomUserWithFKManager()
diff --git a/django/contrib/auth/tests/test_management.py b/django/contrib/auth/tests/test_management.py
index e774d3a..1fe8cee 100644
--- a/django/contrib/auth/tests/test_management.py
+++ b/django/contrib/auth/tests/test_management.py
@@ -350,15 +350,15 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
         self.assertIs(command.stdin, sys.stdin)
 
     @override_settings(AUTH_USER_MODEL='auth.CustomUserWithFK')
-    def test_required_field_with_fk(self):
+    def test_fields_with_fk(self):
         new_io = six.StringIO()
         group = Group.objects.create(name='mygroup')
         email = Email.objects.create(email='mymail@gmail.com')
         call_command(
             'createsuperuser',
             interactive=False,
-            username='user',
-            email='mymail@gmail.com',
+            username=email.pk,
+            email=email.email,
             group=group.pk,
             stdout=new_io,
             skip_checks=True,
@@ -366,7 +366,7 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
         command_output = new_io.getvalue().strip()
         self.assertEqual(command_output, 'Superuser created successfully.')
         u = CustomUserWithFK._default_manager.get(email=email)
-        self.assertEqual(u.username, "user")
+        self.assertEqual(u.username, email)
         self.assertEqual(u.group, group)
 
         non_existent_email = 'mymail2@gmail.com'
@@ -375,19 +375,19 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
             call_command(
                 'createsuperuser',
                 interactive=False,
-                username='user',
+                username=email.pk,
                 email=non_existent_email,
                 stdout=new_io,
                 skip_checks=True,
             )
 
     @override_settings(AUTH_USER_MODEL='auth.CustomUserWithFK')
-    def test_required_fields_with_fk_interactive(self):
+    def test_fields_with_fk_interactive(self):
         new_io = six.StringIO()
         group = Group.objects.create(name='mygroup')
         email = Email.objects.create(email='mymail@gmail.com')
 
-        @mock_inputs({'password': "nopasswd", 'username': "user", 'email': "mymail@gmail.com", 'group': group.pk})
+        @mock_inputs({'password': "nopasswd", 'username': email.pk, 'email': email.email, 'group': group.pk})
         def test(self):
             call_command(
                 'createsuperuser',
@@ -400,7 +400,7 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
             command_output = new_io.getvalue().strip()
             self.assertEqual(command_output, 'Superuser created successfully.')
             u = CustomUserWithFK._default_manager.get(email=email)
-            self.assertEqual(u.username, 'user')
+            self.assertEqual(u.username, email)
             self.assertEqual(u.group, group)
 
         test(self)
@@ -460,6 +460,23 @@ class CustomUserModelValidationTestCase(TestCase):
         ]
         self.assertEqual(errors, expected)
 
+    @override_settings(AUTH_USER_MODEL='auth.CustomUserWithFK')
+    @override_system_checks([check_user_model])
+    def test_username_with_fk_non_unique(self):
+        "A non-unique USERNAME_FIELD should raise a model validation error."
+
+        errors = checks.run_checks()
+        expected = [
+            checks.Error(
+                ("'CustomUserWithFK.username' must be "
+                 "unique because it is named as the 'USERNAME_FIELD'."),
+                hint=None,
+                obj=CustomUserWithFK,
+                id='auth.E003',
+            ),
+        ]
+        self.assertEqual(errors, expected)
+
     @override_settings(AUTH_USER_MODEL='auth.CustomUserNonUniqueUsername',
                        AUTHENTICATION_BACKENDS=[
                            'my.custom.backend',
