Simple way to break Mac User
Ok, another newbie experiment on my new MBP (MacBook Pro) led to break my user account; which afterwards did not allow me to install anything. It should have been nicely accepted what I did, but you never knew the corners of operating system which are not tested..
As I had default user name which is different from rest of my other Linux boxes; so that it becomes easy to ssh or scp instead of suppying the user name everytime … so thought of having the same username even for mac terminal. Instead of creating a new user, I tried to rename the existing one using the utility ‘niutil‘ which comes part of the base OS.
Which actually renamed ‘olduser’ to ‘newuser’, and upon rebooting everything started working. Even when I goto terminal I can see the new user instead of old user.
But the actual problem started when I needed to install any applications or utilities as it needs sudo access. As the olduser is part of sudoers, but the new user is not. I am not sure how it broke..now entering old user and password does not work nor the new one as the password was same for both the users as I never changed them….so, the only option left for me to rebuild the whole system…as I lost the sudo account and I cant even enter to root mode, nor I can enable the root account; which needs sudo access. Either way completely broken..
Before running the niutil I should have added the new user to the sudoers file; that might have worked out or enabling the root user before changing to new user…anyway, its too late… time for reinstall
Related posts:
No Comments





