Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

asiga

macrumors 65816
Original poster
Nov 4, 2012
1,056
1,376
I have installed 10.12.6 from scratch, using the Migration Assistant for copying everything from my 10.11.6 installation, but there's one thing that behaves differently.

I have two users. My normal user isn't in the sudoers file. But I have another superuser, which is. So, whenever I need to do some system change, I enter the superuser password.

However, in 10.11.6, when I wanted superuser privileges from Terminal, I just typed "su superuser" and then I was able to "sudo" as superuser. It worked fine even if the current directory belonged to my normal user.

But now, in my new 10.12.6 installation, if I "su superuser" for a folder belonging to my normal user, I get:
"shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied"

which means that superuser cannot read my normal user folders.

This error didn't happen in 10.11.6, although I don't remember if I had to change anything for it to work.

What could be the easiest way of fixing this? Thanks!!!
 

asiga

macrumors 65816
Original poster
Nov 4, 2012
1,056
1,376
Have you tried another form of the same command? Like sudo su
If I do "sudo superuser" from my normal user account and then I do a "sudo -s" from the superuser, then the superuser has a root session and so it can access the folders and files of my normal user.

However, this doesn't happen in the rest of my Macs. If I do "sudo superuser" in them, the superuser can access all my folders and files. As I said, what I don't remember now is if I changed something for getting that behaviour, or if it's because of a change in Sierra.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.