/etc For Mac OS X
- 0
- Add a Comment
- No Related Post
UNIX users may be familiar with files such as /etc/passwd, /etc/exports, and other key configuration files. Well, I’ve got news for you. Mac OS X doesn’t use ‘em. “But I want to be able to back up and restore such important data!” you say. Ok, no problem.
Open up a terminal and use the commands nidump and niload to dump data from and load data into the NetInfo database (where this stuff is stored). Both nidump and niload work from standard input and output, so you’ll need to redirect data with pipes. To dump password information to the file passwords in a familiar format, nidump passwd . > passwords does the trick The . is the NetInfo domain to work with. . is the local domain and / is the root domain.
If you have a properly formatted file, use the niload command to load it into the database. niload works similarly to nidump. The complement of the above command is niload passwd . < passwords. If you want to see a list of what types of data you can work with, just use the command nidump on its own.
