pingcastle icon indicating copy to clipboard operation
pingcastle copied to clipboard

Impossible de sauvegarder dans certains dossiers si --user est utilisé avec --healthcheck

Open monconpte opened this issue 1 year ago • 1 comments

Bonjour,

Lors ce que j'utilise le healthcheck de pingcastle (pingcastle.exe --healthcheck --server monad.fr --log) tout fonctionne parfaitement, je n'ai aucune erreur et les fichiers .html et .xml sont bien sauvegardés

Cependant, dès que j'utilise un autre utilisateur via le --user (pingcastle.exe --healthcheck --server monad.fr --user [email protected] --log) la connexion marche encore parfaitement, la récupération de données aussi, cependant j'ai une erreur au moment de la sauvegarde

Je travail sur un lecteur réseau, je n'ai pas ce problème si j'utilise --export au lieu de --healthcheck, ni quand je travail sur le bureau J'utilise la dernière version en date sur le site (2.10.1.1) Le problème arrive aussi si j'utilise mon compte actif dans le --user

Logs:

[09:48:15] Generating html report
[09:48:15] An exception occured when doing the task: Perform analysis for monad.fr
Note: you can run the program with the switch --log to get more detail
Exception: Impossible de trouver une partie du chemin d'accès 'K:\DUN\SSI\PingCastle\ad_hc_monad.fr.html'.
   à System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   à System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   à System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   à System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   à System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   à System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   à PingCastle.Report.ReportBase.GenerateReportFile(String filename)
   à PingCastle.Tasks.<>c__DisplayClass12`1.<PerformTheAnalysis>b__11()
   à PingCastle.Tasks.StartTask(String taskname, TaskDelegate taskdelegate)

monconpte avatar Jul 08 '22 08:07 monconpte

utilisez runas à la place ....

Note: utilisant une autre identité, cette autre identité ne sait pas reconnaitre les chemins reseaux monté (K:). Il faudrait utiliser les paths UNC.

vletoux avatar Jul 08 '22 09:07 vletoux