1

Why would "su -fm nobody" prompt to change the nobody password on one MacOS system but not on others?

I am curious about this because system scripts such as locate.updatedb that run as the unprivileged user 'nobody' fail when su stops to ask for a password change. For example:

$ sudo su -fm nobody -c "ls -al /etc/passwd"
Old Password:
New Password:
Retype New Password:
su: Sorry

The same happens if I first change to root

$ sudo su
$ su -fm nobody -c "ls -al /etc/passwd"
Old Password:
..
su: Sorry

su does not prompt for a password change when 'nobody' is replaced with 'root' or a user account:

$ sudo su -fm root -c "ls -al /etc/passwd"
-rw-r--r--  1 root  wheel  6774 Apr  9 19:28 /etc/passwd

The /etc/password entry for 'nobody' and /var/db/dslocal/nodes/Default/users/nobody.plist appear consistent with other working systems.

Update: The problem went away after deleting all profiles. Could a management profile setting a minimum password length have caused this?

You must log in to answer this question.

Browse other questions tagged .