Jump to content

StefanPahrmann

Members
  • Content Count

    39
  • Joined

  • Last visited

  • Days Won

    2

StefanPahrmann last won the day on May 1

StefanPahrmann had the most liked content!

About StefanPahrmann

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. StefanPahrmann

    Documentation for Windows auth to WebAPI throws error

    Thank you very much, that helped! Regards Stefan
  2. StefanPahrmann

    VMWare ESX Password Reset Example

    Hi, of course you can use it . The cmdlet (Set-VMHostAccount) has been around from at least 5.1. Maybe it needs some further testing, but it seems to work here at our place without problems. Regards Stefan
  3. StefanPahrmann

    VMWare ESX Password Reset Example

    I've developed a script, which uses PowerCLI/API (VMwares powershell-modules), instead of SSH. SSH is by default disabled on ESXi-hosts for security-reasons, and I want to keep it that way As mentioned needs PowerCLI installed on the server (Guide can be found here https://blogs.vmware.com/PowerCLI/2017/08/updating-powercli-powershell-gallery.html). No privileged account needed. Function Set-ESXiPassword { [CmdletBinding()] param ( [String]$HostName, [String]$UserName, [String]$OldPassword, [String]$NewPassword ) try{ $conn=Connect-VIServer $HostName -User $UserName -Password $OldPassword } catch { switch -wildcard ($error[0].Exception.ToString().ToLower()) { "*incorrect user*" { Write-Output "Incorrect username or password on host '$HostName'"; break} "*" {write-output $error[0].Exception.ToString().ToLower();break} } } try{ $change=Set-VMHostAccount -UserAccount $UserName -Password $NewPassword Disconnect-Viserver * -confirm:$false } catch { switch -wildcard ($error[0].Exception.ToString().ToLower()) { "*not currently connected*" {Write-Output "It wasn't possible to connect to '$HostName'";break} "*weak password*" { Write-Output "Failed to execute script correctly against Host '$HostName' for the account '$UserName'. It appears the new password did not meet the password complexity requirements on the host."; break } "*" {write-output $error[0].Exception.ToString().ToLower();break} #Add other wildcard matches here as required default { Write-Output "Success" } } } } Set-ESXiPassword -HostName '[HostName]' -UserName '[UserName]' -OldPassword '[OldPassword]' -NewPassword '[NewPassword]' Regards Stefan
  4. When trying to access the documentation for the Windows integrated authentication API, we receive following error: Calling it from here: No errors are shown in the console. Any hints? Regards Stefan Pahrmann
  5. StefanPahrmann

    Create Passwordlists with API fails

    Do'h - you're right about the last one with the 's' - bad sight must come with age . The space was just an error while copying from putty. Thanks, it's working as a charm now. Regards Stefan
  6. StefanPahrmann

    Create Passwordlists with API fails

    Hi again, just tried that, same error (see output, I have a screenshot as well). Passwords in lists can be created and passwords can be generated. Any logfiles to look into or some hints on how to debug? curl -k --request POST https://webserver:9119/api/passwordswordlists -d "PasswordList=ZZZ3-Test" -d "CopyPermissions FromTemplateID=1" -d "CopySettingsFromTemplateID=1" -d "APIKey=xxxxxxxx" [{"errors":[{"message":"Invalid API Call"},{"phrase":"Error = Object reference not set to an instance of an object.}]}] curl -k --request POST https://webserver:9119/api/passwordswordlists -d "PasswordList=ZZZ3-Test" -d "CopyPermissions FromTemplateID=1" -d "CopySettingsFromTemplateID=1" -d "APIKey=xxxxxxxx" [{"errors":[{"message":"Invalid API Call"},{"phrase":"Error = Object reference not set to an instance of an object.}]}] Both PasswordListID and TemplateID do exists. -Stefan
  7. StefanPahrmann

    Create Passwordlists with API fails

    Hi again, I tried that as well. Can you tell me which fields are mandatory, so that I can do a passwordlist-creation with as few options as possible (a shared passwordlist)? I think the documentation is a bit unclear on that topic :-) Regards Stefan
  8. StefanPahrmann

    Create Passwordlists with API fails

    Hi, When trying to create a passwordlist I get an error (this is just a minimalistic query): [{"errors":[{"message":"Invalid API Call"},{"phrase":"Error = Object reference not set to an instance of an object.}]}] The error I get is following: [{"errors":[{"message":"Invalid API Call"},{"phrase":"Error = Object reference not set to an instance of an object.}]}] I tried several options, taken from your documentation, but can't see what I'm missing. Creation of passwords with the same URL (only "password" instead of "passwordlist") works as expected. I'm using build 7476. Regards Stefan Pahrmann
  9. StefanPahrmann

    Upgrade error

    Hi again, I tried the upgrade again, and checked the query (with 0 rows affected) before. I rebooted the server to rule out some "hanging" process. It failed with exactly the same error again. Do you want me to open a supportcase or can we continue here in the forum? -Stefan
  10. StefanPahrmann

    Upgrade error

    The problem with a restore is, that the service was "open" for end users after the failed upgrade and that some passwords probably were updated/newly created. Is there a way to tell which passwords are updated/created after e.g. 2 PM yesterday and by whom (eventually by SQL query)? I could either try to contact them or migrate them by myself afterwards manually? -Stefan
  11. StefanPahrmann

    Upgrade error

    Hi, It's a bit tricky to do a restore, since i needed to rollback and a simple replacement of the files did seem to work. I would rather doing that. Is there some other way? Can we do it with the backup from before the upgrade? It's true I tried to run the upgrade several times, here is the first output: 13-01-2015 13:05:06 - Build 7000 - Step 2 Completed Successfully. 13-01-2015 13:05:44 - Build Process 'Build_7000_DataUpdates' failed with the following error - Query+timeout+expired ::: +++at+System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior+behavior%2c+String+method)%0d%0a+++at+System.Data.OleDb.OleDbCommand.ExecuteNonQuery()%0d%0a+++at+Passwordstate.Upgrade.Build_Schema_Data_Updates(String+sqlScript%2c+String+LogFileDetail) 13-01-2015 13:05:44 - Build Process 'Build_7000_Updates' failed with the following error - Thread+was+being+aborted. ::: +++at+System.Threading.Thread.AbortInternal()%0d%0a+++at+System.Threading.Thread.Abort(Object+stateInfo)%0d%0a+++at+System.Web.HttpResponse.AbortCurrentThread()%0d%0a+++at+Passwordstate.Upgrade.Build_Schema_Data_Updates(String+sqlScript%2c+String+LogFileDetail)%0d%0a+++at+Passwordstate.Upgrade.Build_7000_Updates() Regards Stefan
  12. StefanPahrmann

    Upgrade error

    Hi, I'm trying to upgrade from 6.350 to 7.105, but I'm getting an error during step 2: "Thread was being aborted" at Passwordstate.Upgrade.Build_Schema_Data_Updates. Looking into the logfiles I've found this: 13-01-2015 13:19:00 - Build 7000 Upgrade Started. 13-01-2015 13:19:00 - Build Process 'Build_7000_SchemeUpdates_Part1' failed with the following error - Column+names+in+each+table+must+be+unique.+Column+name+%27FQDN%27+in+table+%27dbo.ADDomains%27+is+specified+more+than+once. ::: +++at+System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior+behavior%2c+String+method)%0d%0a+++at+System.Data.OleDb.OleDbCommand.ExecuteNonQuery()%0d%0a+++at+Passwordstate.Upgrade.Build_Schema_Data_Updates(String+sqlScript%2c+String+LogFileDetail) 13-01-2015 13:19:00 - Build Process 'Build_7000_Updates' failed with the following error - Thread+was+being+aborted. ::: +++at+System.Threading.Thread.AbortInternal()%0d%0a+++at+System.Threading.Thread.Abort(Object+stateInfo)%0d%0a+++at+System.Web.HttpResponse.AbortCurrentThread()%0d%0a+++at+Passwordstate.Upgrade.Build_Schema_Data_Updates(String+sqlScript%2c+String+LogFileDetail)%0d%0a+++at+Passwordstate.Upgrade.Build_7000_Updates() Doing a query select * from dbo.ADDomains gives following: 1 xxxx dc=corp,dc=xxxx,dc=com 1 NULL NULL NULL With FQDN as the 5th column (NULL) Can you give some hints, what to do? Regards Stefan
×