By Brian Jepson, Ernest E. Rothman
Cover | Table of Contents | Colophon
-C to copy,
-C to copy,
-V to paste. Even before you press
-C, the current text selection is
contained in a selection called the pasteboard. The operations
described in Section 1.4, later in this chapter, use the pasteboard.
$TERM is vt100
when running under Terminal (it's set to
xterm under xterm by
default).
xterm & xterm -e -fg green -bg black -e pine -name pine -title pine &
-N or selecting File
→ New Shell from the menu bar.
PATH environment variable each time you launch a
sub-shell.
-V as you start the computer. To boot
in single-user mode, hold down
-S as you start the computer.
-V as you start the computer. To boot
in single-user mode, hold down
-S as you start the computer.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<!-- multiple keys and strings omitted -->
</dict>
</plist>
http://www.mysql.com).
StartService( ), StopService(
), and RestartService( )/etc/periodic/daily/100.clean-logs /etc/periodic/daily/500.daily /etc/periodic/monthly/500.monthly /etc/periodic/weekly/500.weekly
15 3 * * * root periodic daily 30 4 * * 6 root periodic weekly 30 5 1 * * root periodic monthly
sudo periodic daily weekly monthly
gethostent(
). Higher-level APIs, such as Pluggable Authentication
Modules (PAM) and Common Data Security Architecture (CDSA), also use
the C library. Figure 3-2 shows how this works. The
C library connects to lookupd, a thin shim that
is the doorway to the DirectoryService daemon.
The DirectoryService daemon consults the
available plug-ins until it finds the one that can answer the
directory query.
getpw*
family of functions. However,
those functions are not ideal for working with systems like Mac OS X
that support multiple directories (flat files, NetInfo, LDAP, etc.).
In particular, getpwnam( ) is not guaranteed to
return a crypted password if the system has been configured to use
another scheme, such as MD5 passwords. You should use the
PAM API
instead. PAM is included with, or available for, many flavors of
Unix, so you can use it to write portable code. For more information
on PAM, see the pam(8) manpage.
|
Tool
|
Description
|
|---|---|
|
nicl
|
Provides a command-line interface to
NetInfo.
|
|
nidump
|
Extracts flat file format data (such as
/etc/passwd) from NetInfo.
|
|
nifind
|
Finds a NetInfo directory.
|
|
nigrep
|
Performs a regular expression search on NetInfo.
|
|
niload
|
Loads flat file format data (such as
/etc/passwd) into NetInfo.
|
|
nireport
|
Prints tables from NetInfo.
|
nidump [-T timeout] (-r directory|format) [-t] domain
{
"name" = ( "localhost" );
"ip_address" = ( "127.0.0.1" );
"serves" = ( "./local" );
}
% nireport . /groups gid name
-2 nobody
-1 nogroup
0 wheel
1 daemon
2 kmem
3 sys
4 tty
5 operator
6 mail
7 bin
20 staff
25 smmsp
31 guest
45 utmp
66 uucp
68 dialer
69 network
70 www
74 mysql
75 sshd
80 admin
99 unknown
name:password:gid:members). To add a new group,
you can create a file that adheres to that format, and load it with
niload. For ad hoc work, you can use a here
document rather than a separate file:
# niload group . <<EOF ? writers:*:1001: ? EOF
% nireport . /users uid name home realname shell
-2 nobody /dev/null Unprivileged User /dev/null
0 root /var/root System Administrator /bin/tcsh
1 daemon /var/root System Services /dev/null
99 unknown /dev/null Unknown User /dev/null
70 www /Library/WebServer World Wide Web Server /dev/null
name:password:uid:gid:class:change:expire:gecos:home_dir:shell).
See the passwd(5) manpage for a description of
each field. To add a new user, create a file that adheres to that
format and load it with niload. You can use a
here document rather than a separate file. This example creates a
user for Ernest Rothman with a UID of 701 and membership in the
192.168.0.1 xyzzy
ip_address:name). See the
hosts(5)
manpage for a description of each field.
To add a new
host, create
a file using that format and load it with
niload. This example uses a here document
instead of a separate file to add the host
xyzzy:
# niload hosts . <<EOF ? 192.168.0.1 xyzzy ? EOF
/Users -ro -mapall=nobody 192.168.0.134 192.168.0.106
=
user
=
user
:[
group
[:
group
...]]
=username:, it means
the remote user should have no group credentials. You may specify a
username or numeric user ID for user and a
group name or numeric group ID for group.
=
user
=
|
Flat file
|
NetInfo directory
|
Important properties
|
Wired into Directory Services?
|
|---|---|---|---|
|
|
-S as
the system starts up. Next, check to see if you have a backup of the
NetInfo database. The
/etc/daily
cron job backs up the
NetInfo database each time it is run. You can find the backup in
/var/backups/local.nidump. If you
don't have a backup, you won't be
able to restore the NetInfo settings. The local.nidump
file is overwritten each time the
cron job runs, so make sure you back it up
regularly (preferably to some form of removable media).
# /sbin/fsck -y
# /sbin/mount -uw /
# cd /var/db/netinfo/
# mv local.nidb/ local.nidb.broken
# cd /System/Library/StartupItems
http://fink.sourceforge.net) includes
g77
, the GNU FORTRAN
'77 compiler. Also, the Darwin archive includes the
source code for g77, which you can use to
compile FORTRAN code. For more information on the Darwin CVS archive,
see Chapter 7.
% gcc_select
Apple Computer, Inc. GCC version 1161, based on gcc version 3.1
20020420 (prerelease)