Running a MacBook Pro 2016, MacOS Monterey v 12.7.6.
I need to add a username with admin privileges to allow that user to run a specific program, VeraCrypt, as explained here. In summary, one adds this line to the sudoers user section:
your-non-admin-username ALL = (ALL) /Applications/VeraCrypt.app/Contents/MacOS/VeraCrypt
The username has a space in it, like (not the real username) "Clark K". I tried entering this:
Clark K ALL = (ALL) /Applications/VeraCrypt.app/Contents/MacOS/VeraCrypt
When I do this, Visudo gives me a syntax error message without specifying what the syntax problem is. I am guessing it has to do with the two-word username. How do I deal with this?
I have command line experience in Linux, but getting under the hood of the Mac is new to me. Thanks in advance!
id
command to enumerate each user if you don’t know the gid or inspect things usingdscl
or in /var/db/dslocal to find the proper username for this Clark K account. Welcome to Ask Different and to macOS command line peculiarities.uid
sh(c)ould be used insudoers
?