I created a user called dummy
.
I login
using Terminal
into dummy
and try to put Mac to sleep using pmset sleepnow
. It does NOT work: Sleep error 0xe00002c1; You must run this as root.
.
I log into dummy
using Fast User Switching in MacOS GUI. I switch back to my main user [keeping dummy
logged in thanks to the Fast User Switching GUI].
I login
again to dummy
using Terminal
and try pmset sleepnow
. It's working now!
- Why is that?
- How does it work that the command requires sudo, unless I'm logged in the GUI [then it doesn't]?
- What are other commands that magically start working if logged in using the MacOS GUI?
EDIT: Previously I have thought it was like that because of the dummy
being a "standard" account – I've just tested that it is the same issue for "administrator" accounts as well. Still, the questions remain: why/how does it matter, being logged in the GUI, for some commands to work.