Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstalling IfW with JEA with managed user "icinga" enabled throws error #614

Open
Nayakum opened this issue Apr 13, 2023 · 0 comments
Open

Comments

@Nayakum
Copy link

Nayakum commented Apr 13, 2023

Expected Behavior

Uninstalling IfW with JEA enabled or uninstalling JEA through Management Console should go through smoothly. This applies to having managed user "icinga" enabled; installing a JEA profile without managed user is currently not possible in our environment.

Current Behavior

Either uninstalling IfW completely (by Management Console or "Uninstall-IcingaForWindows -Force") or just the JEA profile throws the following error:

[Notice]: Waiting for lock on path „C:\Users\icinga“ to be released before trying to remove it
[Error]: Failed to remove items from path „C:\Users\icinga“. Recurse is „True“, Force is „True“: „System.UnauthorizedAccessException: Access to the path ‚C:\Users\icinga\AppData\Local\Application Data‘ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileSystemEnumerableIterator‚1.CommonInit()
at System.IO.FileSystemEnumerableIterator‚1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler‚1 resultHandler, Boolean checkHost)
at System.IO.DirectoryInfo.EnumerateDirectories()
at Microsoft.PowerShell.Commands.FileSystemProvider.RemoveDirectoryInfoItem(DirectoryInfo directory, Boolean recurse, Boolean force, Boolean rootOfRemoval)
at Microsoft.PowerShell.Commands.FileSystemProvider.RemoveDirectoryInfoItem(DirectoryInfo directory, Boolean recurse, Boolean force, Boolean rootOfRemoval)
at Microsoft.PowerShell.Commands.FileSystemProvider.RemoveDirectoryInfoItem(DirectoryInfo directory, Boolean recurse, Boolean force, Boolean rootOfRemoval)
at Microsoft.PowerShell.Commands.FileSystemProvider.RemoveDirectoryInfoItem(DirectoryInfo directory, Boolean recurse, Boolean force, Boolean rootOfRemoval)
at Microsoft.PowerShell.Commands.FileSystemProvider.RemoveItem(String path, Boolean recurse)“
[Warning]: This user is not managed by Icinga directly. Skipping permission update

Please note that the rest of the uninstallation is going through with no issues. JEA is deactivated and IfW is uninstalled, respectively. It's just the user folder "icinga" is left over after this.

Additionally, I noticed during testing (which involved a number of installations and uninstallations of JEA & IfW on the host) that in C:\Users, a new folder for an icinga user is created whenever I install JEA with managed user. This holds true between installations of IfW.

grafik

I can delete some of those folders, but not all, even when IfW is uninstalled. Seems like I need rights from a longer existing user. The last few digits change between folders that are to be deleted.

grafik

Steps to Reproduce (for bugs)

  1. Install IfW & enable JEA with managed user "icinga" in the Management Console
  2. Uninstall JEA with managed user "icinga" or IfW completely via Management Console, or uninstall IfW in a PowerShell with "Uninstall-IcingaForWindows -Force"

grafik

Context

Since the rest of the uninstallation is going through, this is not really an issue in our daily work. Just wanted to bring it to attention or get to know whether this is a general issue or has something to do with our configuration.

Your Environment

  • PowerShell Version used ($PSVersionTable.PSVersion):
    grafik

  • Operating System and version (Get-IcingaWindowsInformation Win32_OperatingSystem | Select-Object Version, BuildNumber, Caption):
    grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant