0

I created a user on OS X Mavericks – dscl . -create /Users/newuser UserShell /bin/sh – without setting any password. This is confirmed by reading the user file with the dscl interactive prompt.

However, when I sudo su newuser and try to su back to root, bash prompts me for a password. I need to close the terminal and open a new window to exit the user session.

Why is that?

1 Answers1

2

When you run sudo su newuser, you are effectively running as "newuser". Running su as "newuser" will require escalating to root, requiring a password.

Try just exiting the the original su session with exit or <ctrl-d>. This should return you to the original shell.

problemPotato
  • 589
  • 3
  • 8
  • But the root password is not being accepted, so what password is required? –  Mar 06 '14 at 22:43
  • Are you sure `root` has a password? As a security precaution, Mac OS X doesn't ship with one. – chepner Mar 07 '14 at 00:09