lithnet / access-manager

Access Manager provides web-based access to local admin (LAPS) passwords, BitLocker recovery keys, and just-in-time administrative access to Windows computers in a modern, secure, and user-friendly way.
Other
238 stars 20 forks source link

Documentation Errors #233

Closed gbica-hzo closed 2 months ago

gbica-hzo commented 3 months ago

MacOS Agent Uninstall

Full script #!/bin/sh echo "This will uninstall the Lithnet Access Manager Agent, and remove all configuration for this machine" read -p "Are you sure? " -n 1 -r echo if [ $REPLY =~ ^[Yy]$ ] then /bin/launchctl unload "/Library/LaunchDaemons/io.lithnet.accessmanager.agent.plist" rm "/Library/LaunchDaemons/io.lithnet.accessmanager.agent.plist" rm -rf "/Library/Application Support/Lithnet/AccessManagerAgent" fi

The link https://docs.lithnet.io/ams/installation/installing-the-access-manager-agent/installing-the-access-manager-agent-macos describes the following steps

Uninstalling the agent You can use the uninstallation script provided to remove the agent from the computer.

sudo /Library/Application\ Support/Lithnet/AccessManagerAgent/Core/Lithnet.AccessManager.Agent/uninstall.sh

but the uninstall.sh is not there, instead it is here /Library/Application\ Support/Lithnet/AccessManagerAgent/Core/uninstall.sh

Further problems, when running the script sh /Library/Application\ Support/Lithnet/AccessManagerAgent/Core/uninstall.sh

it throws an error

sh /Library/Application\ Support/Lithnet/AccessManagerAgent/Core/uninstall.sh This will uninstall the Lithnet Access Manager Agent, and remove all configuration for this machine Are you sure? y /Library/Application Support/Lithnet/AccessManagerAgent/Core/uninstall.sh: line 5: [: =~: binary operator expected

If we ran the lines individually, the 1st one fails

/bin/launchctl unload "/Library/LaunchDaemons/io.lithnet.accessmanager.agent.plist"

Warning: Expecting a LaunchAgents path since the command was ran as root. Got LaunchDaemons instead.
`launchctl bootout` is a recommended alternative.
Unload failed: 5: Input/output error
Try running `launchctl bootout` as root for richer errors.
jcspencer commented 3 months ago

Hi @gbica-hzo,

Thank you for pointing this out!

I believe this may be a ZSH vs. Bash script difference, as this script was developed when macOS used bash as the default shell.

We will update the documentation accordingly.

Thanks!

gbica-hzo commented 3 months ago

@jcspencer Note there are 2 issue here.

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.