O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

niload

Synopsis

niload  [-v] [-T timeout] [(-d|-m)] [(-p|-P password)]
[-u user] {-r directory|format} [-t] domain

Reads the Unix flat file format from standard input and loads it into the NetInfo database.

Options

-v

Select verbose mode.

-T timeout

Specify a timeout in seconds.

-d

Specify that if a duplicate entry already exists, NetInfo deletes that entry before adding the new one. This can cause you to lose data if NetInfo is tracking information that isn't represented in the flat file. For example, if you dump the /users directory to a flat passwd file format and load it back in with niload -d, you will lose the picture, hint, and sharedDir properties for every user on your system because the passwd file doesn't have a field for those properties. Most of the time, the -m option is what you want.

-m

Specify that if a duplicate entry already exists, niload will merge the changes. So, if you dump the /users directory to a flat passwd file format, change a user's shell, and load that file back in with niload, NetInfo will keep the old shell. If you use the -m option, NetInfo will accept the new shell without the destructive side effects of the -d option.

-p

Prompt for a password. You can use this instead of prefixing the command with sudo.

-P password

Use the specified password.

Tip

If your shell history file is enabled, the -P option presents a security risk, since the password will be stored, along with the history of other shell commands. It is best to avoid using this option. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required