ls: : Operation not permitted - Mojave security? Is this directory protected by Mojave's new security features?

$ sudo ls -laR /var/db/dslocal/nodes/Default/
ls: Operation not permitted


It works in High Sierra but not Mojave. How do we view the contents of this directory?
A less drastic way:

Go to System Preferences > Security &amp; Privacy and give Full Disk Access to Terminal.

Adapted from https://discussions.apple.com/thread/8637915