Adding Netinfo User via Terminal
December 15, 2004 11:12PM
edited January 2014
I stupidly deleted the user "nobody" thinking an external program had added it. I found out it is part of OS X's standard users. Is there a command line way to add it back? I know it was a dumb mistake, but I could use some help
Reply 1 of 2
December 16, 2004 1:59PM
open terminal and su - root (you can sudo each and every command if you want).
tar cf local_nidb.tar local.nidb
cd (takes you home)
copy the next line(s) to a tmp file say nobody.txt
(it should all be on one line)
now comes the tricky part
nidump passwd / |grep nobody (just to make sure nobody really isn't there)
niload passwd . < nobody.txt (adds nobody back to the user list)
nidump passwd / |grep nobody (check its there).
This worked on my test box.
Edit: No responsibility taken it your system hoses itself.
Reply 2 of 2
December 16, 2004 4:00PM
Thanks fo your help, dobby, but another user in a different Unix forum showed me this:
echo "nobody:*:-2:-2::0:0:Unprivileged User:/var/empty:/usr/bin/false" | sudo niload passwd .
which worked. Appreciate you taking the time though.