Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33615

Admin rights delegation issue on W10 in powershell plugin

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • powershell-plugin
    • None
    • PowerShell plugin 1.3
      Jenkins 1.638 running as service on W10 10.0.10586 with override account .\jenkins (local administrator)

      I am trying to execute:

      $run = "Timber"
      $workspace = "C:\jenkins.workspaces"
      try
      {
      Write-Output "Removing the log file ($workspace\trunk\Poirot_ESA_Jenkins_temp\$run.log)"
      if (Test-Path("$workspace\trunk\Poirot_ESA_Jenkins_temp\$run.log"))

      { Remove-Item -Path "$workspace\trunk\Poirot_ESA\_Jenkins\_temp\$run.log" -Force }

      }
      catch

      { Write-Output "The file $workspace\trunk\Poirot_ESA\_Jenkins\_temp\$run.log from previous run was not found." } Write-Output "Attempting to run $workspace\trunk\Poirot_ESA\$run.ps1" {color:red}

      c:_femenv\psexec
      jen-trunk -i 2 $env:SystemRoot\system32\WindowsPowerShell\v1.0\powershell.exe -File "$workspace\trunk\Poirot_ESA\$run.ps1"

      try
      {
      Write-Output "Seaching for a new log file ($workspace\trunk\Poirot_ESA_Jenkins_temp\$run.log)"
      if (Test-Path("$workspace\trunk\Poirot_ESA_Jenkins_temp\$run.log"))

      { Get-Content "$workspace\trunk\Poirot_ESA\_Jenkins\_temp\$run.log" }

      }
      catch
      {
      Write-Output "The file $workspace\trunk\Poirot_ESA_Jenkins_temp\$run.log doesn't exist. The run is marked as failure."
      break
      }

      The red line is causing a problem. The PSEXE tool can't establish PSEXE service because the lack of admin privileges. If I run the hudson script in same way like the plugin does from powershell with elevated privileges, everything works fine. If build the job in Jenkins, PSEXE fails. If use a cmd execution, it works but from other reasons, I can't use is permanently.
      The strange thing is that this script worked before and as far as I know, nothing change since the last working state.

          [JENKINS-33615] Admin rights delegation issue on W10 in powershell plugin

          Radek Zahradník created issue -
          Radek Zahradník made changes -
          Component/s New: powershell-plugin [ 16044 ]
          Component/s Original: _unsorted [ 19622 ]
          Radek Zahradník made changes -
          Assignee Original: Oleg Nenashev [ oleg_nenashev ] New: Damien Finck [ damienfinck67 ]
          Radek Zahradník made changes -
          Summary Original: Admin rights delegation issue on W10 New: Admin rights delegation issue on W10 in powershell plugin
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 169574 ] New: JNJira + In-Review [ 183550 ]
          Damien Finck made changes -
          Assignee Original: Damien Finck [ damienfinck67 ] New: Filipe Roque [ froque ]

            froque Filipe Roque
            kutlime Radek Zahradník
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: