1

I have a problem. I have 2 users user (normal user) and admin (admin user). I normally work on user user and when I wanted to update some files (as for example /etc/hosts) I did:

$ su admin
Password: 
$ sudo nano /etc/hosts
Password: 

However from some time (probably from update to MacOS Catalina). It's not working anymore.

I can switch to admin user (1st command) however when I try to run 2nd command I'm getting message "sorry" although I'm 100% sure I type valid password (I copied this password to text editor and pasted this password to 1st command and it's working fine but it doesn't work for 2nd command).

  • Are you running sudo from your normal account or after running su admin? – nohillside Dec 1 '19 at 12:38
  • @nohillside As I explained I'm running it after 1st command so after switching to admin user – Marcin Nabiałek Dec 1 '19 at 14:49
2

It seems the solution was after running 1st command to run:

sudo -s

Somehow it fixed situation and now again both commands are working without any problem as they did before. Hard to say what was the reason for this (maybe introducting zsh) but now I can again edit files I need

0

Restarting the Mac helped me. It's not so obvious, comparing to Windows. A lot of people do not switch it off or restart at all, just closing the display.

New contributor
Artem is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • For me it was not helping as far as I remember but I restart Mac about once a month – Marcin Nabiałek yesterday

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .