I have a corporate account work
on my macbook that has administrator privileges and created a non-administrative account local
.
Logged in as local
, when I tried a command with sudo, I got the familiar is not in the sudoers file
.
The file /etc/sudoers
is owned by the usual root/wheel
. I tried to modify the file inside a su work
shell but it was readonly for that user. Then I tried su root
but that didn't work either. Then I found out that I need to enable to the root user.
I enabled the root user, but still cannot su root
, still get the same terse su: Sorry
. I seem to have enabled the root user correctly, since the process to enable it now gives the option to disable it or change password.
How can I get su
to work for user local
? Is there a another way to allow the user local
to use sudo
?
sudo visudo
which opens vi on the sudoers filesudo visudo
inside asu - <admin-account>
but it failed and later the samething from assh <admin-account>@localhost
did, I could be wrong but now my non-privileged account is insudoers
and I am happy camper.