Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-8696

DSC : disabled user with password throwing error

    XMLWordPrintable

    Details

    • Template:
      MODULES Bug Template
    • Acceptance Criteria:
      Hide

      It has to disable the user and it doesn't show any Error ( Run should be idempotent)

      Show
      It has to disable the user and it doesn't show any Error ( Run should be idempotent)
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: 
      Puppet Version: All 
      OS Name/Version: Windows -2012R2 

      Describe your issue in as much detail as possible...

      Desired Behavior: Throwing Error 

      Actual Behavior: It has to disable the user and it doesn't show any Error ( Run should be idempotent)

      Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue.

      When user trying to disable the guest user with a password, First run it successfull,  and further runs it is throwing an error.  

       

      Steps to reproduce the issue : 

      Below is the manifest. 

      dsc_user { 'guest':
      dsc_ensure => present,
      dsc_username => 'guest',
      dsc_description => 'guest account',
      dsc_password => {
      'user' => 'guest',
      'password' => Sensitive('jane-password'),
      },
      dsc_passwordneverexpires => true,
      dsc_disabled => true,
      }

       

      PS C:\temp> puppet apply .\testuser.pp
      Notice: Compiled catalog for l0wwhvg10f2sbfs.delivery.puppetlabs.net in environm
      ent production in 0.15 seconds
      Notice: /Stage[main]/Testuser/Dsc_user[guest]/ensure: created
      Notice: Applied catalog in 8.20 seconds
      PS C:\temp> puppet apply .\testuser.pp
      Notice: Compiled catalog for l0wwhvg10f2sbfs.delivery.puppetlabs.net in environm
      ent production in 0.16 seconds
      Error: /Stage[main]/Testuser/Dsc_user[guest]: Could not evaluate: PowerShell DSC
      resource MSFT_UserResource failed to execute Test-TargetResource functionality
      with error message: There could be a possible connection error while trying to
      use the System.DirectoryServices API's.Exception calling "ValidateCredentials" w
      ith "2" argument(s): "This user can't sign in because this account is currently
      disabled.
      "
      Notice: Applied catalog in 6.89 seconds
      PS C:\temp> puppet apply .\testuser.pp
      Notice: Compiled catalog for l0wwhvg10f2sbfs.delivery.puppetlabs.net in environm
      ent production in 0.18 seconds
      Error: /Stage[main]/Testuser/Dsc_user[guest]: Could not evaluate: PowerShell DSC
      resource MSFT_UserResource failed to execute Test-TargetResource functionality
      with error message: There could be a possible connection error while trying to
      use the System.DirectoryServices API's.Exception calling "ValidateCredentials" w
      ith "2" argument(s): "This user can't sign in because this account is currently
      disabled.
      "
      Notice: Applied catalog in 4.43 seconds
      PS C:\temp>

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              karthikeyan.kanagaraj Karthikeyan Kanagaraj
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support