diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter
index 2316001da84851e900f4189cc960ae2ec0a4ed8e..cdf3e7127b1a289cd7476e0d102805589eefad58 100644
--- a/installer/resources/i2prouter
+++ b/installer/resources/i2prouter
@@ -647,11 +647,6 @@ checkUser() {
     # Check the configured user.  If necessary rerun this script as the desired user.
     if [ "X$RUN_AS_USER" != "X" ]
     then
-        if [ "`$IDEXE -u -n "$RUN_AS_USER" 2>/dev/null`" != "$RUN_AS_USER" ]
-        then
-            echo 'User $RUN_AS_USER does not exist.'
-            exit 1
-        fi
 
         # Resolve the location of the 'id' command
         IDEXE="/usr/xpg4/bin/id"
@@ -665,6 +660,11 @@ checkUser() {
                 exit 1
             fi
         fi
+        if [ "`$IDEXE -u -n "$RUN_AS_USER" 2>/dev/null`" != "$RUN_AS_USER" ]
+        then
+            echo 'User $RUN_AS_USER does not exist.'
+            exit 1
+        fi
 
         if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ]
         then