You need to find the location of Open Directory Database. '/private/var/db/dslocal/nodes/Default'
Which was in my case '/Volume/Macintosh HD/Recovered Items/private/var/db/dslocal/nodes/Default'
Find the directory and then replace that line.
Here are few tips for finding it:
You start from where your volume is mounted to. In my case, it was '/Volume/Macintosh HD'
Under that '/Recovered Items' is where you can find the Open Directory Database. This may be not the case of you, then skip this step.
Under that '/private/var' or '/var' (which is a symlink of '/private/var') will be found.
Inside it, you should find '/db/dslocal/nodes/Default'. this is the OD.
When you run
diskutil apfs list
You can see the mount point of your volume.
Then run
diskutil apfs updatePreboot <YOUR DISK HERE> -od <YOUR DIRECTORY HERE>
Example:
diskutil apfs updatePreboot disk2s1 -od /Volume/Macintosh HD/Recovered Items/private/var/db/dslocal/nodes/Default