Uploaded image for project: 'VCL'
  1. VCL
  2. VCL-1054

Windows.pm user_exists may return true when user doesn't exist

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.2
    • 2.5
    • vcld (backend)
    • None

    Description

      Windows.pm::user_exists is only checking the exit status of the net user command, not the output. If a user exists, the command should return an exit status of 0. If the user does not exist, it should return exit status 2.

      jfthomps showed me a case where vcld.log was reporting exit status 0 (user exists) when the user did not exist:

      2017-06-23 12:50:11|8075|16|16|reinstall|Windows.pm:user_exists|1870|user admin exists on vm1-4, exit status: 0, output:
      |8075|16|16|reinstall|Windows.pm:user_exists|1870| The user name could not be found.
      |8075|16|16|reinstall|Windows.pm:user_exists|1870| More help is available by typing NET HELPMSG 2221.
      

      I'm not sure why the exit status is incorrect. Regardless, the output should be checked to prevent this.

      Attachments

        Activity

          People

            arkurth Andrew Kurth
            arkurth Andrew Kurth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: