joshua-d-miller / macOSLAPS

Swift binary that will change a local administrator password to a random generated password. Similar behavior to LAPS for Windows
MIT License
387 stars 58 forks source link

utility fails to run as root - claims to not be run as root #49

Closed skraus86 closed 3 years ago

skraus86 commented 3 years ago

We're trying to troubleshoot using this with our AD laps, when we try to run as an admin OR as a root, it claims it is not being run as a root user.

Screen Shot 2021-03-11 at 1 50 06 PM Screen Shot 2021-03-11 at 1 49 32 PM Screen Shot 2021-03-11 at 1 49 26 PM

joshua-d-miller commented 3 years ago

This is an executable so you do not need to use the open command. You can run it since I'm assuming you used the pkg installer by calling either sudo macOSLAPS or as root macOSLAPS. If you want to spell out the full path then you can do something like /usr/local/laps/macOSLAPS or sudo /usr/local/laps/macOSLAPS.

skraus86 commented 3 years ago

That did it, thanks Joshua