Command Line
Command Line
Apple Computer, Inc. 2003 Apple Computer, Inc. All rights reserved. The owner or authorized user of a valid copy of Mac OS X Server software may reproduce this publication for the purpose of learning to use such software. No part of this publication may be reproduced or transmitted for commercial purposes, such as selling copies of this publication or for providing paid for support services. The Apple logo is a trademark of Apple Computer, Inc., registered in the U.S. and other countries. Use of the keyboard Apple logo (Option-Shift-K) for commercial purposes without the prior written consent of Apple may constitute trademark infringement and unfair competition in violation of federal and state laws. Apple, the Apple logo, AirPort, AppleScript, AppleShare, AppleTalk, ColorSync, FireWire, iMac, Keychain, Mac, Macintosh, Power Mac, Power Macintosh, QuickTime, Sherlock, and WebObjects are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. Extensions Manager and Finder are trademarks of Apple Computer, Inc. 034-2354/10-24-03
Contents
Preface
11 11 11 11 11 12 12 13 13 14 14 14 15 16 16 17 17 18 18 19 19 19 21 21 21 21 22 25 25 25
About This Book Notation Conventions Summary Commands and Other Terminal Text Command Parameters and Options Default Settings Commands Requiring Root Privileges Typing Commands Using Terminal Correcting Typing Errors Repeating Commands Including Paths Using Drag-and-Drop Commands Requiring Root Privileges Sending Commands to a Remote Server Sending a Single Command Updating SSH Key Fingerprints Notes on Communication Security and servermgrd Using Telnet Getting Online Help for Commands Notes About Specific Commands and Tools serversetup serveradmin Installing Server Software and Finishing Basic Setup Installing Server Software Automating Server Setup Creating a Configuration File Template Creating Customized Configuration Files from the Template File Naming Configuration Files Storing a Configuration File in an Accessible Location Changing Server Settings
Chapter 1
Chapter 2
26 26 27 Chapter 3 29 29 29 29 30 30 30 31 31 31 31 32 32 32 33 33 33 33 34 34 34 35 35 35 35 35 36 36 37 37 37 38 38 38 38 38
Viewing, Validating, and Setting the Software Serial Number Updating Server Software Moving a Server Restarting or Shutting Down a Server Restarting a Server Examples Automatic Restart Changing a Remote Servers Startup Disk Shutting Down a Server Examples Setting General System Preferences Computer Name Viewing or Changing the Computer Name Date and Time Viewing or Changing the System Date Viewing or Changing the System Time Viewing or Changing the System Time Zone Viewing or Changing Network Time Server Usage Energy Saver Settings Viewing or Changing Sleep Settings Viewing or Changing Automatic Restart Settings Power Management Settings Startup Disk Settings Viewing or Changing the Startup Disk Sharing Settings Viewing or Changing Remote Login Settings Viewing or Changing Apple Event Response International Settings Viewing or Changing Language Settings Login Settings Disabling the Restart and Shutdown Buttons Network Preferences Network Interface Information Viewing Port Names and Hardware Addresses Viewing or Changing MTU Values Viewing or Changing Media Settings Network Port Configurations Creating or Deleting Port Configurations Activating Port Configurations
Chapter 4
Chapter 5
Contents
39 39 39 40 41 42 42 42 42 42 43 43 43 43 44 44 44 44 44 44 45 45 Chapter 6 47 47 47 47 47 48 49 50 50 50 51 51 51 51 52 53 53 54 55
Changing Configuration Precedence TCP/IP Settings Changing a Servers IP Address Viewing or Changing IP Address, Subnet Mask, or Router Address Viewing or Changing DNS Servers Enabling TCP/IP AppleTalk Settings Enabling and Disabling AppleTalk Proxy Settings Viewing or Changing FTP Proxy Settings Viewing or Changing Web Proxy Settings Viewing or Changing Secure Web Proxy Settings Viewing or Changing Streaming Proxy Settings Viewing or Changing Gopher Proxy Settings Viewing or Changing SOCKS Firewall Proxy Settings Viewing or Changing Proxy Bypass Domains AirPort Settings Viewing or Changing Airport Settings Computer, Host, and Rendezvous Name Viewing or Changing the Computer Name Viewing or Changing the Local Host Name Viewing or Changing the Rendezvous Name Working With Disks and Volumes Mounting and Unmounting Volumes Mounting Volumes Unmounting Volumes Checking for Disk Problems Monitoring Disk Space Reclaiming Disk Space Using Log Rolling Scripts Managing Disk Journaling Checking to See if Journaling is Enabled Turning on Journaling for an Existing Volume Enabling Journaling When You Erase a Disk Disabling Journaling Erasing, Partitioning, and Formatting Disks Setting Up a Case-Sensitive HFS+ File System Imaging and Cloning Volumes Using ASR Working With Users and Groups Creating Server Administrator Users Importing Users and Groups Creating a Character-Delimited User Import File
Chapter 7
Contents
57 62 63 63 63 63 Chapter 8 65 65 65 66 67 67 67 67 67 67 68 68 72 72 73 73 74 75 76 76 76 76 76 77 77 77 77 77 77 78 78 79 80 80 80 80
User Attributes Checking a Server Users Name, UID, or Password Creating a Users Home Directory Mounting a Users Home Directory Creating a Group Folder Checking a Users Administrator Privileges Working With File Services Share Points Listing Share Points Creating a Share Point Modifying a Share Point Disabling a Share Point AFP Service Starting and Stopping AFP Service Checking AFP Service Status Viewing AFP Settings Changing AFP Settings List of AFP Settings List of AFP serveradmin Commands Listing Connected Users Sending a Message to AFP Users Disconnecting AFP Users Canceling a User Disconnect Listing AFP Service Statistics Viewing AFP Log Files NFS Service Starting and Stopping NFS Service Checking NFS Service Status Viewing NFS Settings Changing NFS Service Settings FTP Service Starting FTP Service Stopping FTP Service Checking FTP Service Status Viewing FTP Settings Changing FTP Settings FTP Settings List of FTP serveradmin Commands Viewing the FTP Transfer Log Checking for Connected FTP Users Windows (SMB) Service Starting and Stopping SMB Service
Contents
Checking SMB Service Status Viewing SMB Settings Changing SMB Settings List of SMB Service Settings List of SMB serveradmin Commands Listing SMB Users Disconnecting SMB Users Listing SMB Service Statistics Updating Share Point Information Viewing SMB Service Logs Working With Print Service Starting and Stopping Print Service Checking the Status of Print Service Viewing Print Service Settings Changing Print Service Settings Print Service Settings Queue Data Array Print Service serveradmin Commands Listing Queues Pausing a Queue Listing Jobs and Job Information Holding a Job Viewing Print Service Log Files Working With NetBoot Service Starting and Stopping NetBoot Service Checking NetBoot Service Status Viewing NetBoot Settings Changing NetBoot Settings NetBoot Service Settings General Settings Storage Record Array Filters Record Array Image Record Array Port Record Array Working With Mail Service Starting and Stopping Mail Service Checking the Status of Mail Service Viewing Mail Service Settings Changing Mail Service Settings Mail Service Settings
Chapter 10
Chapter 11
Contents
116 117 118 119 119 121 121 122 122 Chapter 12 123 123 123 123 124 124 124 125 125 125 126 127 129 129 129 129 129 130 130 131 133 134 134 135 135 135 135 135 135 135 135 136
Mail serveradmin Commands Listing Mail Service Statistics Viewing the Mail Service Logs Setting Up SSL for Mail Service Generating a CSR and Creating a Keychain Obtaining an SSL Certificate Importing an SSL Certificate Into the Keychain Creating a Passphrase File Setting Up SSL for Mail Service on a Headless Server Working With Web Technologies Starting and Stopping Web Service Checking Web Service Status Viewing Web Settings Changing Web Settings serveradmin and Apache Settings Changing Settings Using serveradmin Web serveradmin Commands Listing Hosted Sites Viewing Service Logs Viewing Service Statistics Example Script for Adding a Website Working With Network Services DHCP Service Starting and Stopping DHCP Service Checking the Status of DHCP Service Viewing DHCP Service Settings Changing DHCP Service Settings DHCP Service Settings DHCP Subnet Settings Array Adding a DHCP Subnet List of DHCP serveradmin Commands Viewing the DHCP Service Log DNS Service Starting and Stopping the DNS Service Checking the Status of DNS Service Viewing DNS Service Settings Changing DNS Service Settings DNS Service Settings List of DNS serveradmin Commands Viewing the DNS Service Log Listing DNS Service Statistics
Chapter 13
Contents
136 136 137 137 137 137 138 141 141 142 142 142 142 142 142 143 143 144 144 145 145 145 145 145 146 149 149 150 150 150 151 152 153 Chapter 14 155 155 155 155 155 156 156 157 157
Firewall Service Starting and Stopping Firewall Service Checking the Status of Firewall Service Viewing Firewall Service Settings Changing Firewall Service Settings Firewall Service Settings Defining Firewall Rules IPFilter Rules Array Firewall serveradmin Commands Viewing Firewall Service Log Using Firewall Service to Simulate Network Activity NAT Service Starting and Stopping NAT Service Checking the Status of NAT Service Viewing NAT Service Settings Changing NAT Service Settings NAT Service Settings NAT serveradmin Commands Viewing the NAT Service Log VPN Service Starting and Stopping VPN Service Checking the Status of VPN Service Viewing VPN Service Settings Changing VPN Service Settings List of VPN Service Settings List of VPN serveradmin Commands Viewing the VPN Service Log IP Failover Requirements Failover Operation Enabling IP Failover Configuring IP Failover Enabling PPP Dial-In Working With Open Directory General Directory Tools Testing Your Open Directory Configuration Modifying an Open Directory Node Testing Open Directory Plugins Registering URLs With Service Location Protocol (SLP) Changing Open Directory Service Settings LDAP Configuring LDAP
Contents
157 158 158 159 159 159 159 159 159 160 Chapter 15 161 161 161 161 162 162 163 166 166 167 168 168 169 171
A Note on Using ldapsearch Idle Rebinding Options Additional Information About LDAP NetInfo Configuring NetInfo Password Server Working With the Password Server Viewing or Changing Password Policies Enabling or Disabling Authentication Methods Kerberos and Single Sign On Working With QuickTime Streaming Server Starting QTSS Service Stopping QTSS Service Checking QTSS Service Status Viewing QTSS Settings Changing QTSS Settings QTSS Settings QTSS serveradmin Commands Listing Current Connections Viewing QTSS Service Statistics Viewing Service Logs Forcing QTSS to Re-Read its Preferences Preparing Older Home Directories for User Streaming
Index
10
Contents
Notation Conventions
The following conventions are used throughout this book.
Summary
Notation monospaced font $ [text_in_brackets] (one|other) underlined [...] <anglebrackets> Indicates A command or other terminal text A shell prompt An optional parameter Alternative parameters (type one or the other) A parameter you must replace with a value A parameter that may be repeated A displayed value that depends on your server configuration
To use this command, type doit without the dollar sign at the command prompt in a Terminal window, then press the Return key.
Preface
11
Parameters You Must Type as Shown If you need to type a parameter as shown, it appears following the command in the same font. For example,
$ doit -w later -t 12:30
To use the command in the above example, type the entire line as shown. Parameter Values You Provide If you need to supply a value, its placeholder is underlined and has a name that indicates what you need to provide. For example,
$ doit -w later -t hh:mm
In the above example, you need to replace hh with the hour and mm with the minute, as shown in the previous example. Optional Parameters If a parameter is available but not required, it appears in square brackets. For example,
$ doit [-w later]
To use the command in the above example, type either doit or doit -w later. The result might vary but the command will be performed either way. Alternative Parameters If you need to type one of a number of parameters, theyre separated by a vertical line and grouped within parentheses ( | ). For example,
$ doit -w (now|later)
To perform the command, you must type either doit -w now or doit -w later.
Default Settings
Descriptions of server settings usually include the default value for each setting. When this default value depends on other choices youve made (such as the name or IP address of your server, for example), its enclosed in angle brackets <>. For example, the default value for the IMAP mail server is the host name of your server. This is indicated by mail:imap:servername = "<hostname>".
12
Typing Commands
How to use Terminal to execute commands, connect to a remote server, and view online information about commands and utilities.
To access a UNIX shell command prompt, you open the Terminal application. In Terminal, you can use the ssh command to log in to other servers. You can use the man command to view online documentation for most common commands.
Using Terminal
To enter shell commands or run server command-line tools and utilities, you need access to a UNIX shell prompt. Both Mac OS X and Mac OS X Server include Terminal, an application you can use to start a UNIX shell command-line session on the local server or on a remote server.
m
To open Terminal: Click the Terminal icon in the dock or double-click the application icon in the Finder (in /Applications/Utilities). Terminal presents a prompt when its ready to accept a command. The prompt you see depends on Terminal and shell preferences, but often includes the name of the host youre logged in to, your current working directory, your user name, and a prompt symbol. For example, if youre using the default bash shell and the prompt is
server1:~ admin$
youre logged in to a computer named server1 as the user named admin and your current directory is the admins home directory (~). Throughout this manual, wherever a command is shown as you might type it, the prompt is abbreviated as $.
13
To type a command: Wait for a prompt to appear in the Terminal window, then type the command and press Return. If you get the message command not found, check your spelling. If the error recurs, the program youre trying to run might not be in your default search path. Add the path before the program name or change your working directory to the directory that contains the program. For example:
[server:/] admin$ serversetup -getAllPort serversetup: Command not found. [server:/] admin$ /System/Library/ServerSetup/serversetup -getAllPort 1 Built-in Ethernet [server:/] admin$ cd /System/Library/ServerSetup [server:/System/Library/ServerSetup] admin$ ./serversetup -getAllPort 1 Built-in Ethernet [server:/System/Library/ServerSetup] admin$ cd / [server:/] admin$ PATH = "$PATH:/System/Library/ServerSetup" [server:/] admin$ serversetup -getAllPort 1 Built-in Ethernet
Repeating Commands
To repeat a command, press Up-Arrow until you see the command, then press Return. To repeat a command with modifications, press Up-Arrow until you see the command, press Left-Arrow or Right-Arrow to skip over parts of the command you dont want to change, press Delete to remove characters, type regular characters to insert them, then press Return to execute the command.
14
Youre prompted for the root password if you havent used sudo recently. The root user password is set to the administrator user password when you install Mac OS X Server. To switch to the root user so you dont have to repeatedly type sudo, use the su command:
$ su root
Youre prompted for the root user password and then are logged in as the root user until you log out or use the su command to switch to another user. Important: As the root user, you have sufficient privileges to do things that can cause your server to stop working properly. Dont execute commands as the root user unless you understand clearly what youre doing. Logging in as an administrative user and using sudo selectively might prevent you from making unintended changes. Throughout this guide, commands that require root privileges begin with sudo.
15
where username is the name of an administrator user on the remote server and server is the name or IP address of the server. Example: ssh -l admin 10.0.1.2 3 If this is the first time youve connected to the server, youre prompted to continue connecting after the remote computers RSA fingerprint is displayed. Type yes and press Return. 4 When prompted, type the users password (the users password on the remote server) and press Return. The command prompt changes to show that youre now connected to the remote server. In the case of the above example, the prompt might look like
[10.0.1.2:~] admin$
5 To send a command to the remote server, type the command and press Return.
m
or
$ ssh -l admin@server1.company.com "rm /Users/admin/Documents/report"
16
Type yes and press Return to finish authenticating. If you later see a warning message about a man-in-the-middle attack when you try to connect, it might be because the key on the remote computer no longer matches the key stored on the local computer. This can happen if you: Change your SSH configuration Perform a clean install of the server software Start up from a Mac OS X Server CD To connect again, delete the entries corresponding to the remote computer (which can be stored by both name and IP address) in the file ~/.ssh/known_hosts. Important: Removing an entry from the known_hosts file bypasses a security mechanism that helps you avoid imposters and man-in -the-middle attacks. Be sure you understand why the key on the remote computer has changed before you delete its entry from the known_hosts file.
17
Using Telnet
Because it isnt as secure as SSH, Telnet access isnt enabled by default. To enable Telnet access:
$ service telnet start
Type man command, where command is the command youre curious about. This
usually displays detailed information about the command, its options, parameters, and proper use. Example:
$ man serveradmin
Examples:
$ hdiutil help $ dig -h $ diff --help
18
Or, if you want to use the utility to perform several commands, you can change your working directory and type a shorter command:
$ cd /System/Library/ServerSetup $ ./serversetup -getAllPort $ ./serversetup -getDefaultInfo
or add the directory to your search path for this session and type an even shorter command:
$ PATH = "$PATH:/System/Library/ServerSetup" $ serversetup -getAllPort
To permanently add the directory to your search path, add the path to the file /etc/profile.
serveradmin
You can use the serveradmin tool to perform many service-related tasks. Youll see it used throughout this guide. Determining Whether a Service Needs to be Restarted Some services need to be restarted after you change certain settings. If a change you make using a services writeSettings command requires that you restart the service, the output from the command includes the setting <svc>:needsRecycleOrRestart with a value of yes. Important: The needsRecycleOrRestart setting is displayed only if you use the serveradmin svc:command = writeSettings command to change settings. You wont see it if you use the serveradmin settings command.
19
Commands you can use to install, set up, and update Mac OS X Server software on local or remote computers. Installing Server Software
You can use the installer command to install Mac OS X Server or other software on a computer. For more information, see the man page.
21
To create a template configuration file at any time after initial setup: 1 Open the Server Assistant (in /Applications/Server). 2 In the Welcome pane, choose Save setup information in a file or directory record and click Continue. 3 Enter settings on the remaining panes, then, after you review the settings in the final pane, click Save As. 4 In the dialog that appears, choose Configuration File next to Save as and click OK. So you can later edit the file, dont select Save in Encrypted Format. 5 Choose a location to save the file and click Save.
22
<key>DS</key> <dict> <key>DSClientInfo</key> <string>2 - NetInfo client - broadcast dhcp static -192.168.42.250 network</string> <key>DSClientType</key> <string>2</string> <key>DSType</key> <string>2 - directory client</string> </dict> <key>HostName</key> <string>server1.company.com</string> <key>InstallLanguage</key> <string>English</string> <key>Keyboard</key> <dict> <key>DefaultFormat</key> <string>0</string> <key>DefaultScript</key> <string>0</string> <key>ResID</key> <integer>0</integer> <key>ResName</key> <string>U.S.</string> <key>ScriptID</key> <integer>0</integer> </dict> <key>NetworkInterfaces</key> <array> <dict> <key>ActiveAT</key> <true/> <key>ActiveTCPIP</key> <true/> <key>DNSDomains</key> <array> <string>company.com</string> </array> <key>DNSServers</key> <array> <string>192.168.100.10</string> </array> <key>DeviceName</key> <string>en0</string> <key>EthernetAddress</key> <string>00:0a:93:bc:6d:1a</string> <key>PortName</key> <string>Built-in Ethernet</string> <key>Settings</key> <dict> <key>DHCPClientID</key>
23
<string></string> <key>Type</key> <string>DHCP Configuration</string> </dict> </dict> </array> <key>NetworkTimeProtocol</key> <dict> <key>UsingNTP</key> <false/> </dict> <key>Rendezvous</key> <dict> <key>RendezvousEnabled</key> <true/> <key>RendezvousName</key> <string>beasbe3</string> </dict> <key>SerialNumber</key> <string>a-123-bcd-456-efg-789-hij-012-klm-345-n</string> <key>ServicesAutoStart</key> <dict> <key>Apache</key> <false/> <key>File</key> <false/> <key>MacManager</key> <false/> <key>Mail</key> <false/> <key>Print</key> <false/> <key>QTSS</key> <false/> <key>WebDAV</key> <false/> </dict> <key>TimeZone</key> <string>US/Pacific</string> <key>VersionNumber</key> <integer>1</integer> </dict> </plist>
Note: The actual contents of a configuration file depend on the hardware configuration of the computer on which its created. This is one reason you should start from a template configuration file created on a computer similar to those you plan to set up.
24
The Server Assistant uses the file to set up the server with the matching address, name, or serial number. If the Server Assistant cannot find a file named for a particular server, it will use the file named generic.plist.
where vol is any device volume mounted in the /Volumes directory. Devices you can use to provide configuration files include A partition on one of the servers hard disks An iPod An optical (CD or DVD) drive A USB or FireWire drive Any other portable storage device that mounts in the /Volumes directory
25
Parameter serialnumber
Description A valid Mac OS X Server software serial number, as found on the software packaging that comes with the software.
To install an update:
$ softwareupdate --install update-version
Parameter update-version
Description The hyphenated product version string that appears in the list of updates when you use the --list option.
26
Moving a Server
Try to place a server in its final network location (subnet) before setting it up for the first time. If youre concerned about unauthorized or premature access, you can set up a firewall to protect the server while you're finalizing its configuration. If you must move a server after initial setup, you need to change settings that are sensitive to network location before the server can be used. For example, the server's IP address and host namestored in both directories and configuration files that reside on the servermust be updated. When you move a server, consider these guidelines: Minimize the time the server is in its temporary location so the information you need to change is limited. Dont configure services that depend on network settings until the server is in its final location. Such services include Open Directory replication, Apache settings (such as virtual hosts), DHCP, and other network infrastructure settings that other computers depend on. Wait to import final user accounts. Limit accounts to test accounts so you minimize the user-specific network information (such as home directory location) that will need to change after the move. After you move the server, use the changeip tool to change IP addresses, host names, and other data stored in Open Directory NetInfo and LDAP directories on the server. See Changing a Servers IP Address on page 39. You may need to manually adjust some network configurations, such as the local DNS database, after using the tool. Reconfigure the search policy of computers (such as user computers and DHCP servers) that have been configured to use the server in its original location.
27
Commands you can use to shut down or restart a local or remote server. Restarting a Server
You can use the reboot or shutdown -r command to restart a server at a specific time. For more information, see the man pages.
Examples
To restart the local server:
$ shutdown -r now
Description The IP address or DNS name of the server. The hour and minute when the server restarts.
Automatic Restart
You can also use the systemsetup command to set up the server to start automatically after a power failure or system freeze. See Viewing or Changing Automatic Restart Settings on page 33.
29
Parameter disk
Description The name of the disk that contains the desired startup volume.
For information on using SSH to log in to a remote server, see Sending Commands to a Remote Server on page 16.
Examples
To shut down a remote server immediately:
$ ssh -l root server shutdown -h now
Parameter server
30
Commands you can use to set system preferences, usually set using the System Preferences GUI application. Computer Name
You can use the systemsetup command to view or change a servers computer name (the name used to browse for AFP share points on the server), which would otherwise be set using the Sharing pane of System Preferences.
or
$ sudo networksetup -getcomputername
or
$ sudo networksetup -setcomputername computername
31
or
$ serversetup -getDate
or
$ sudo serversetup -setDate mm/dd/yy
or
$ serversetup -getTime
or
$ sudo serversetup -setTime hh:mm:ss
or
$ serversetup -getTimeZone
or
$ sudo serversetup -setTimeZone timezone
32
To see how long the system waits to restart after a power failure:
$ sudo systemsetup -getWaitForStartupAfterPowerFailure
33
To set how long the system waits to restart after a power failure:
$ sudo systemsetup -setWaitForStartupAfterPowerFailure seconds
Parameter seconds
34
Sharing Settings
You can use the systemsetup command to view or change settings that would otherwise be set using the Sharing pane of System Preferences.
or
$ serversetup -enableSSH
Telnet access is disabled by default because it isnt as secure as SSH. You can, however, enable Telnet access. See Using Telnet on page 18.
International Settings
You can use the serversetup command to view or change language settings that would otherwise be set using the Sharing pane of System Preferences.
35
Login Settings
Disabling the Restart and Shutdown Buttons
To disable or enable the Restart and Shutdown buttons in the login dialog:
$ sudo serversetup -setDisableRestartShutdown (0|1)
0 disables the buttons. 1 enables the buttons. To view the current setting:
$ serversetup -getDisableRestartShutdown
36
Network Preferences
Commands you can use to change a servers network settings. Network Interface Information
This section describes commands you address to a specific hardware device (for example, en0) or port (for example, Built-in Ethernet). If you prefer to work with network port configurations following the approach used in the Network preferences pane of System Preferences, see the commands in Network Port Configurations on page 38.
An asterisk in the results (*) marks an inactive configuration. To view the default (en0) Ethernet (MAC) address of the server:
$ serversetup -getMacAddress
This command checks the computer for new network hardware and creates a default configuration for each new port.
37
38
The configurations are listed in the order that theyre tried when a network connection is established. An asterisk (*) marks an inactive configuration. To change the order of the port configurations:
$ sudo networksetup -ordernetworkservices config1 config2 [config3] [...]
TCP/IP Settings
Changing a Servers IP Address
Changing a servers IP address isnt as simple as changing the TCP/IP settings. Address information is set throughout the system when you set up the server. To make sure that all the necessary changes are made, use the changeip command. To change a servers IP address: 1 Run the changeip tool:
$ changeip [(directory|-)] old-ip new-ip [old-hostname new-hostname]
Parameter directory
Description If the server is an Open Directory master or replica, or is connected to a directory system, you must include the path to the directory domain (directory node). For a standalone server, type - instead. The current IP address. The new IP address. (optional) The current DNS host name of the server. (optional) The new DNS host name of the server.
For more information or examples, see the man page. 2 Use the networksetup or serversetup command (or the Network pane of System Preferences) to change the servers IP address in its network settings. 3 Restart the server.
39
Example:
$ networksetup -getinfo "Built-In Ethernet" Manual Configuration IP Address: 192.168.10.12 Subnet mask: 255.255.0.0 Router: 192.18.10.1 Ethernet Address: 1a:2b:3c:4d:5e:6f
To validate an IP address:
$ serversetup -isValidIPAddress ipaddress
40
41
Enabling TCP/IP
To enable TCP/IP on a particular port:
$ serversetup -EnableTCPIP [(devicename|"portname")]
If you dont provide an interface, en0 is assumed. To disable TCP/IP on a particular port:
$ serversetup -DisableTCPIP [(devicename|"portname")]
AppleTalk Settings
Enabling and Disabling AppleTalk
To enable AppleTalk on a particular port:
$ serversetup -EnableAT [(devicename|"portname")]
If you dont provide an interface, en0 is assumed. To disable AppleTalk on a particular port:
$ serversetup -DisableAT [(devicename|"portname")]
Proxy Settings
Viewing or Changing FTP Proxy Settings
To view the FTP proxy information for a configuration:
$ sudo networksetup -getftpproxy "configuration"
42
43
AirPort Settings
Viewing or Changing Airport Settings
To see if AirPort power is on or off:
$ sudo networksetup -getairportpower
or
$ sudo networksetup -getcomputername
or
$ serversetup -getComputername
44
or
$ sudo networksetup -setcomputername computername
or
$ sudo serversetup -setComputername computername
The command displays a 0 if the name was changed. Note: If you use the Server Admin GUI application to connect to a server using its Rendezvous name, then change the servers Rendezvous name, you will need to reconnect to the server the next time you open the Server Admin application.
45
Commands you can use to prepare, use, and test disks and volumes. Mounting and Unmounting Volumes
You can use the mount_afp command to mount an AFP volume. For more information, type man mount_afp to see the man page.
Mounting Volumes
You can use the mount command with parameters appropriate to the type of file system you want to mount, or use one of these file-system-specific mount commands: mount_afp for Apple File Protocol (AppleShare) volumes mount_cd9660 for ISO 9660 volumes mount_cddafs for CD Digital Audio format (CDDA) volumes mount_hfs for Apple Hierarchical File System (HFS) volumes mount_msdos for PC MS-DOS volumes mount_nfs for Network File System (NFS) volumes mount_smbfs for Server Message Block (SMB) volumes mount_udf for Universal Disk Format (UDF) volumes mount_webdav for Web-based Distributed Authoring and Versioning (WebDAV) volumes For more information, see the related man pages.
Unmounting Volumes
You can use the umount command to unmount a volume. For more information, see the man page.
47
window and typing sudo diskspacemonitor on. You may be prompted for your password. Type man diskspacemonitor for more information about the commandline options. When enabled, diskspacemonitor uses information in a configuration file to determine when to execute alert and recovery scripts for reclaiming disk space: The configuration file is /etc/diskspacemonitor/diskspacemonitor.conf. It lets you specify how often you want to monitor disk space and thresholds to use for determining when to take the actions in the scripts. By default, disks are checked every 10 minutes, an alert script executed when disks are 75% full, and a recovery script executed when disks are 85% full. To edit the configuration file, log in to the server as an administrator and use a text editor to open the file. See the comments in the file for additional information. By default, two predefined action scripts are executed when the thresholds are reached. The default alert script is /etc/diskspacemonitor/action/alert. It runs in accord with instructions in configuration file /etc/diskspacemonitor/alert.conf. It sends email to recipients you specify. The default recovery script is /etc/diskspacemonitor/action/recover. It runs in accord with instructions in configuration file /etc/diskspacemonitor/recover.conf. See the comments in the script and configuration files for more information about these files.
If you want to provide your own alert and recovery scripts, you can. Put your
alert script in /etc/diskspacemonitor/action/alert.local and your recovery script in /etc/diskspacemonitor/action/recovery.local. Your scripts will be executed before the default scripts when the thresholds are reached. To configure the scripts on a server from a remote Mac OS X computer, open a Terminal window and log in to the remote server using SSH.
48
49
Look for journaled in the attributes in parentheses following a volume. For example:
/dev/disk0s9 on / (local, journaled)
Parameter volume
Example
$ mount /dev/disk0s9 on / (local, journaled) /dev/disk0s10 on /Volumes/OS 9.2.2 (local) $ sudo fsck_hfs /dev/disk0s10/ ** /dev/rdisk0s10 ** Checking HFS plus volume. ** Checking extents overflow file. ** Checking Catalog file. ** Checking Catalog hierarchy. ** Checking volume bitmap. ** Checking volume information. ** The volume OS 9.2.2 appears to be OK. $ diskutil enableJournal /dev/disk0s10 Allocated 8192K for journal file. Journaling has been enabled on /dev/disk0s10 $ mount /dev/disk0s9 on / (local, journaled) /dev/disk0s10 on /Volumes/OS 9.2.2 (local, journaled)
50
Description The name you want the new disk volume to have. The device name of the disk.
Disabling Journaling
To disable journaling:
$ diskutil disableJournal volume
Parameter volume
Description The name given to the reformatted, case-sensitive volume. The path to the existing volume to be reformatted. For example, /Volumes/HFSPlus
51
See the asr man page for command syntax, limitations, and image preparation instructions.
52
Commands you can use to set up and manage users and groups in Mac OS X Server. Creating Server Administrator Users
You can use the serversetup command to create administrator users for a server. To create regular users, see Importing Users and Groups on page 54. To create a user:
$ serversetup -createUser fullname shortname password
The name, short name, and password must be typed in the order shown. If the full name includes spaces, type it in quotes. The command displays a 1 if the full name or short name is already in use. To create a user with a specific UID:
$ serversetup -createUserWithID fullname shortname password userid
The name, short name, password, and UID must be typed in the order shown. If the full name includes spaces, type it in quotes. The command displays a 1 if the full name, short name, or UID is already in use or if the UID you specified is less than 100. To create a user with a specific UID and home directory:
$ serversetup -createUserWithIDIP fullname shortname password userid homedirpath
The name, short name, password, and UID must be typed in the order shown. If the full name includes spaces, type it in quotes. The command displays a 1 if the full name, short name, or UID is already in use or if the UID you specified is less than 100.
53
Parameter -g|-s|-p
Description You must specify one of these to indicate the type of file youre importing: -g for a character-delimited file -s for an XML file exported from Users & Groups in Mac OS X Server version 10.1.x -p for an XML file exported from AppleShare IP version6.x The path of the file to import. The path to the Open Directory node where the records will be added. The name of the directory administrator. The password of the directory administrator. Specifies how user data is handled if a record for an imported user already exists in the directory: O: Overwrite the matching record. M: Merge the records. Empty attributes in the directory assume values from the imported record. I: Ignore imported record and leave existing record unchanged. A: Append data from import record to existing record. Additional command options. To see available options, execute the dsimportexport command with no parameters.
options
To import users and groups: 1 Create a file containing the accounts to import, and place it in a location accessible from the importing server. You can export this file from an earlier version of Mac OS X Server or AppleShare IP 6.3, or create your own character-delimited file. See Creating a Character-Delimited User Import File on page 55. Open Directory supports up to 100,000 records. For local NetInfo databases, make sure the file contains no more than 10,000 records. 2 Log in as the administrator of the directory domain into which you want to import accounts.
54
3 Open the Terminal application and type the dsimportexport command. The tool is located in /Applications/Utilities/Workgroup Manager.app/Contents/Resources. To include the space in the path name, precede it with a backslash (\). For example:
/Applications/Utilities/Workgroup\ Manager.app/Contents/Resources /dsimportexport -h
4 If you want, use the createhomedir tool to create home directories for imported users. See Creating a Users Home Directory on page 63.
55
In addition, you can include UserShell (the default shell) NFSHomeDirectory (the path to the users home directory on the users computer) Other user data types, described under User Attributes on page 57 For group accounts, the list of attributes must include RecordName (the group name) PrimaryGroupID (the group ID) GroupMembership Here is an example of a record description:
0x0A 0x5C 0x3A 0x2C DSRecTypeStandard:Users 7 RecordName Password UniqueID PrimaryGroupID RealName NFSHomeDirectory UserShell
The record consists of values, delimited by colons. Use a double colon (::) to indicate a value is missing. Here is another example, which shows a record description and user records for users whose passwords are to be validated using the Password Server. The record description should include a field named dsAttrTypeStandard:AuthMethod, and the value of this field for each record should be dsAuthMethodStandard:dsAuthClearText:
0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Users 8 dsAttrTypeStandard:RecordName dsAttrTypeStandard:AuthMethod dsAttrTypeStandard:Password dsAttrTypeStandard:UniqueID dsAttrTypeStandard:PrimaryGroupID dsAttrTypeStandard:Comment dsAttrTypeStandard:RealName dsAttrTypeStandard:UserShell skater:dsAuthMethodStandard\:dsAuthClearText:pword1:374:11:comment: Tony Hawk:/bin/csh mattm:dsAuthMethodStandard\:dsAuthClearText:pword2:453:161:: Matt Mitchell:/bin/tcsh
As these examples illustrate, you can use the prefix dsAttrTypeStandard: when referring to an attribute, or you can omit the prefix. Using the StandardUserRecord Shorthand When the first record in a character-delimited import file contains StandardUserRecord, the following record description is assumed:
0x0A 0x5C 0x3A 0x2C DSRecTypeStandard:Users 7 RecordName Password UniqueID PrimaryGroupID RealName NFSHomeDirectory UserShell
56
Using the StandardGroupRecord Shorthand When the first record in a character-delimited import file contains StandardGroupRecord, the following record description is assumed:
0x0A 0x5C 0x3A 0x2C DSRecTypeStandard:Groups 4 RecordName Password PrimaryGroupID GroupMembership
User Attributes
The following table lists standard XML data structures for attributes in user records.
Attribute RecordName: A list of names associated with a user; the first is the users short name, which is also the name of the users home directory Important: All attributes used for authentication must map to RecordName. RealName: A single name, usually the users full name; not used for authentication Format First value: ASCII characters AZ, az, 09, _,Second value: UTF-8 Roman text UTF-8 text Sample values Dave David Mac DMacSmith Non-zero length, 1 to 16 values. Maximum 255 bytes (85 triple-byte to 255 single-byte characters) per instance. First value must be 1 to 30 bytes for clients using Macintosh Manager, or 1 to 8 bytes for clients using Mac OS X version 10.1 and earlier. David L. MacSmith, Jr. Non-zero length, maximum 255 bytes (85 triple-byte to 255 single-byte characters). Range is 100 to 2,147,483,648. Values below 100 are typically used for system accounts. Zero is reserved for use by the system. Normally unique among entire population of users, but sometimes can be duplicated. Warning: A non-integer value is interpreted as 0, which is the UniqueID of the root user.
UniqueID: Signed 32-bit A unique user identifier, used ASCII string of digits 09 for access privilege management
PrimaryGroupID: A users primary group association NFSHomeDirectory: Local file system path to the users home directory
Unsigned Range is 1 to 2,147,483,648. 32-bit ASCII Normally unique among entire population of group string of digits records. If blank, 20 is assumed. 09 UTF-8 text /Network/Servers/example/Users/ K-M/Tom King Non-zero length. Maximum 255 bytes.
57
Attribute
Format
Sample values <home_dir> <url> afp://server/sharepoint </url> <path> usershomedirectory </path> </home_dir> In the following example, Tom Kings home directory is K-M/Tom King, which resides beneath the share point directory, Users: <home_dir> <url> afp://example.com/Users </url> <path> K-M/Tom King </path> </home_dir>
HomeDirectoryQuota: The disk quota for the users home directory MailAttribute: A users mail service configuration (refer to Mail Attributes in User Records on page 60 for information on individual fields in this structure)
Text for the If the quota is 10MB, the value will be the text string number of 1048576. bytes allowed Structured text <dict> <key>kAttributeVersion</key> <string>Apple Mail 1.0</string> <key>kAutoForwardValue</key> <string>user@example.com</string> <key>kIMAPLoginState</key> <string>IMAPAllowed</string> <key>kMailAccountLocation</key> <string>domain.example.com</string> <key>kMailAccountState</key> <string>Enabled</string> <key>kNotificationState</key> <string>NotificationStaticIP</string> <key>kNotificationStaticIPValue</key> <string>[1.2.3.4]</string> <key>kPOP3LoginState</key> <string>POP3Allowed</string> <key>kSeparateInboxState</key> <string>OneInbox</string> <key>kShowPOP3InboxInIMAP</key> <string>HidePOP3Inbox</string> </dict>
PrintServiceUserData UTF-8 XML A users print quota statistics plist, single value
58
Attribute MCXFlags: If present, MCXSettings is loaded; if absent, MCXSettings isnt loaded; required for a managed user. MCXSettings: A users managed preferences AdminLimits The privileges allowed by Workgroup Manager to a user that can administer the directory domain Password: The users password Picture: File path to a recognized graphic file to be used as a display picture for the user Comment: Any documentation you like UserShell: The location of the default shell for command-line interactions with the server
Sample values
UTF-8 XML plist, single value UTF-8 XML plist, single value
John is in charge of product marketing. /bin/tcsh /bin/sh None (this value prevents users with accounts in the directory domain from accessing the server remotely via a command line) Non-zero length. Values describe the users authentication methods. Can be multivalued (for example, basic and ShadowHash). Each value has the format vers; tag; data (where vers and data may be blank). Crypt password: ;basic; Open Directory authentication: ;ApplePasswordServer; HexID, servers public key IPaddress:port Shadow password (local directory domain only): ;ShadowHash; Your guess is as good as mine. Maximum 255 bytes.
Authentication Authority: Describes the users authentication methods, such as Open Directory or crypt password; not required for a user with only a crypt password; absence of this attribute signifies legacy authentication (crypt with Authentication Manager, if its available). AuthenticationHint: Text set by the user to be displayed as a password reminder
ASCII text
UTF-8 text
59
Mail Attributes in User Records The following table lists the standard XML data structures for a user mail attribute, part of a standard user record.
MailAttribute field AttributeVersion Description A required case-insensitive value that must be set to AppleMail 1.0. Sample values <key> kAttributeVersion </key> <string> AppleMail 1.0 </string> <key> kMailAccountState </key> <string> Enabled </string> <key> kPOP3LoginState </key> <string> POP3Deny </string> <key> kIMAPLoginState </key> <string> IMAPAllowed </string> <key> kMailAccountLocation </key> <string> domain.example.com </string> <key> kAutoForwardValue </key> <string> user@example.com </string>
MailAccountState
A required case-insensitive keyword describing the state of the users mail. It must be set to one of these values: Off, Enabled, or Forward.
POP3LoginState
A required case-insensitive keyword indicating whether the user is allowed to access mail via POP. It must be set to one of these values: POP3Allowed or POP3Deny. A required case-insensitive keyword indicating whether the user is allowed to access mail using IMAP. It must be set to one of these values: IMAPAllowed or IMAPDeny. A required value indicating the domain name or IP address of the ProductName responsible for storing the users mail.
IMAPLoginState
MailAccountLocation
AutoForwardValue
A required field only if MailAccountState has the value Forward. The value must be a valid RFC 822 email address.
60
Description An optional keyword describing whether to notify the user whenever new mail arrives. If provided, it must be set to one of these values: NotificationOff, NotificationLastIP, or NotificationStaticIP. If this field is missing, NotificationOff is assumed. An optional IP address, in bracketed, dotted decimal format ([xxx.xxx.xxx.xxx]). If this field is missing, NotificationState is interpreted as NotificationLastIP. The field is used only when NotificationState has the value NotificationStaticIP. An optional case-insensitive keyword indicating whether the user manages POP and IMAP mail using different inboxes. If provided, it must be set to one of these values: OneInbox or DualInbox. If this value is missing, the value OneInbox is assumed. An optional case-insensitive keyword indicating whether POP messages are displayed in the users IMAP folder list. If provided, it must be set to one of these values: ShowPOP3Inbox or HidePOP3Inbox. If this field is missing, the value ShowPOP3Inbox is assumed.
NotificationStaticIP Value
SeparateInboxState
ShowPOP3InboxInIMAP
61
The command displays a 1 if the name is already in the directory, 0 if it isnt. To see if a short name is already in use:
$ serversetup -verifyName shortname
The command displays a 1 if the name is already in the directory, 0 if it isnt. To see if a UID is already in use:
$ serversetup -verifyUID userid
The command displays a 1 if the UID is already in the directory, 0 if it isnt. To test a users password:
$ serversetup -verifyNamePassword shortname password
The command displays a 1 if the password is good, 0 if it isnt. To view the names associated with a UID:
$ serversetup -getNamesByID userid
No response means UID not valid. To generate the default UNIX short name for a user long name:
$ serversetup -getUNIXName "longname"
62
You can also create a users home directory using the serversetup tool. To create a home directory for a particular user:
$ serversetup -createHomedir userid
The command displays a 0 if the user has administrator privileges, 0 if the user doesnt.
63
Commands you can use to create share points and manage AFP, NFS, Windows (SMB), and FTP services in Mac OS X Server. Share Points
You can use the sharing tool to list, create, and modify share points.
In the resulting list, theres a section of properties similar to the following for each share point defined on the server. (1 = yes, true, or enabled. 0 = false, no, or disabled.)
name: path: afp: Share1 /Volumes/100GB { name: Share1 shared: 1 guest access: inherit perms: { name: Share1 shared: 1 guest access: { name: Share1 shared: 1 guest access: inherit perms: oplocks: strict locking: directory mask: create mask:
0 0
} ftp:
} smb:
1 0 0 0 493 420 }
65
Description The full path to the directory you want to share. The name of the share point. If you dont specify this custom name, its set to the name of the directory, the last name in path. The share point name shown to and used by AFP clients. This name is separate from the share point name. The share point name shown to and used by FTP clients. The share point name shown to and used by SMB clients. A three-digit binary number indicating which protocols are used to share the directory. The digits represent, from left to right, AFP, FTP, and SMB. 1=shared, 0=not shared. A group of three flags indicating which protocols allow guest access. The flags are written as a three-digit binary number with the digits representing, from left to right, AFP, FTP, and SMB. 1=guests allowed, 0=guests not allowed. A group of two flags indicating whether new items in AFP or SMB share points inherit the ownership and access permissions of the parent folder. The flags are written as a two-digit binary number with the digits representing, from left to right, AFP and SMB. 1=inherit, 0=dont inherit. The SMB creation mask. Default=0644. The SMB directory mask. Default=0755. Specifies whether opportunistic locking is allowed for an SMB share point. 1=enable oplocks, 0=disable oplocks. For more information on oplocks, see the file services administration guide. Specifies whether strict locking is used on an SMB share point. 1=enable strict locking, 0=disable. For more information on strict locking, see the file services administration guide.
guestflags
inheritflags
strictlockingflag
Examples
$ sharing -a /Volumes/100GB/Art
Creates a share point named Art, shared using AFP, FTP, and SMB, and using the name Art for all three types of clients.
$ sharing -a /Volumes/100GB/Windows\ Docs -n WinDocs -S Documents -s 001 -o 1
66
Shares the directory named Windows Docs on the disk 100GB. The share point is named WinDocs for server management purposes, but SMB users see it as Documents. Its shared using only the SMB protocol with oplocks enabled.
Description The current name of the share point. See the parameter descriptions under Creating a Share Point on page 66.
Parameter sharepointname
AFP Service
Starting and Stopping AFP Service
To start AFP service:
$ sudo serveradmin start afp
67
Parameter setting
Description Any of the AFP service settings. For a complete list of settings, type serveradmin settings afp or see List of AFP Settings on this page.
To list a group of settings: You can list a group of settings that have part of their names in common by typing only as much of the name as you want, stopping at a colon (:), and typing an asterisk (*) as a wildcard for the remaining parts of the name. For example,
$ sudo serveradmin settings afp:loggingAttributes:*
Parameter setting
Description An AFP service setting. To see a list of available settings, type $ sudo serveradmin settings afp or see List of AFP Settings on this page. An appropriate value for the setting. Enclose text strings in double quotes (for example, "text string").
value
68
Description Rollover size (in kilobytes) for the activity log. Only used if activityLogTime isnt specified. Default = 1000 Rollover time (in days) for the activity log. Default = 7 Set to true to force administrative users on Mac OS X to see share points instead of all volumes. Default = yes Set to true to force administrative users on Mac OS 9 to see share points instead of all volumes. Default = no Encoding used with Mac OS 9 clients. Default = 0 TCP port used by AFP on server. Default = 548 Allow user to log in as root. Default = no Allow an administrator user to masquerade as another user. Default = yes Authentication mode. Can be: standard kerberos standard_and_kerberos Default = "standard_and_kerberos" Whether the AFP service should restart automatically when abnormally terminated. Default = yes Allow client computers to sleep. Default = yes Time (in hours) that clients are allowed to sleep. Default = 24 Create home directories. Default = yes The location of the error log. Default = /Library/Logs/AppleFileService/ AppleFileServiceError.log Rollover size (in kilobytes) for the error log. Only used if errorLogTime isnt specified. Default = 1000 Rollover time (in days) for the error log. Default = 0
activityLogTime admin31GetsSp
autoRestart
errorLogSize
errorLogTime
69
Parameter (afp:) guestAccess idleDisconnectFlag: adminUsers idleDisconnectFlag: guestUsers idleDisconnectFlag: registeredUsers idleDisconnectFlag: usersWithOpenFiles idleDisconnectMsg idleDisconnectOnOff idleDisconnectTime kerberosPrincipal loggingAttributes: logCreateDir loggingAttributes: logCreateFile loggingAttributes: logDelete loggingAttributes: logLogin loggingAttributes: logLogout loggingAttributes: logOpenFork loginGreeting loginGreetingTime maxConnections
Description Allow guest users access to the server. Default = yes Enforce idle disconnect for administrative users. Default = yes Enforce idle disconnect for guest users. Default = yes Enforce idle disconnect for registered users. Default = yes Enforce idle disconnect for users with open files. Default = yes The idle disconnect message. Default = "" Enable idle disconnect. Default = no Idle time (in minutes) allowed before disconnect. Default = 10 Kerberos server principal name. Default = "afpserver" Record directory creations in the activity log. Default = yes Record file creations in the activity log. Default = yes Record file deletions in the activity log. Default = yes Record user logins in the activity log. Default = yes Log user logouts in the activity log. Default = yes Log file opens in the activity log. Default = yes The login greeting message. Default = "" The last time the login greeting was set or updated. Maximum number of simultaneous user sessions allowed by the server. Default = -1 (unlimited) Maximum number of simultaneous guest users allowed. Default = -1 (unlimited)
maxGuests
70
Description Maximum number of AFP threads. (Must be specified at startup.) Default = 40 Indication to client that all users are users on the server. Default = no How permissions are enforced. Can be set to: classic_permissions unix_with_classic_admin_permissions unix_permissions Default = "classic_permissions" Time-to-live (in hours) for the server key used to generate reconnect tokens. Default = 168 Time-to-live (in minutes) for a reconnect token. Default = 10080 Allow reconnect options. Can be set to: none all no_admin_kills Default = "all" Time-to-live (in minutes) for a disconnected session waiting reconnection. Default = 1440 Advertise the server using AppleTalk NBP. Default = yes Advertise the server using Rendezvous. Default = yes Send the login greeting only once. Default = no Dont modify. Internal use only. Grant administrative users super user read/write privileges. Default = no Allow SSH tunneling. Default = yes TCP message quantum. Default = 262144 Frequency of tickles sent to client. Default = 30 Enforce quotas on the users volume. Default = yes
noNetworkUsers permissionsModel
recon1SrvrKeyTTLHrs
recon1TokenTTLMins reconnectFlag
reconnectTTLInMin
71
Output The following array of settings is displayed for each connected user:
afp:usersArray:_array_index:i:disconnectID = <disconnectID> afp:usersArray:_array_index:i:flags = <flags> afp:usersArray:_array_index:i:ipAddress = <ipAddress> afp:usersArray:_array_index:i:lastUseElapsedTime = <lastUseElapsed> afp:usersArray:_array_index:i:loginElapsedTime = <loginElapsedTime> afp:usersArray:_array_index:i:minsToDisconnect = <minsToDisconnect> afp:usersArray:_array_index:i:name = <name> afp:usersArray:_array_index:i:serviceType = <serviceType> afp:usersArray:_array_index:i:sessionID = <sessionID> afp:usersArray:_array_index:i:sessionType = <sessionType> afp:usersArray:_array_index:i:state = <state>
72
Description The message that appears on client computers. The session ID of a user you want to receive the message. To list the session IDs of connected users, use the getConnectedUsers command. See Listing Connected Users on page 72.
Description The text of a message that appears on client computers in the disconnect announcement dialog. The number of minutes between the time the command is issued and the users are disconnected. The session ID of a user you want to disconnect. To list the session IDs of connected users, use the getConnectedUsers command. See Listing Connected Users on page 72.
73
Output
afp:command = "disconnectUsers" afp:messageSent = "<message>" afp:timeStamp = "<time>" afp:timerID = <disconnectID> <user listing> afp:status = <status>
Description The message sent to users in the disconnect announcement dialog. The time when the command was issued. An integer that identifies this particular disconnect. You can use this ID with the cancelDisconnect command to cancel the disconnect. A standard array of user settings for each user scheduled for disconnect. For a description of these settings, see Listing Connected Users on page 72. A command status code: 0 = command successful
<user listing>
<status>
Parameter timerID
Description The integer value of the afp:timerID parameter output when you issued the disconnectUsers command. You can also find this number by listing any user scheduled to be disconnected and looking at the value of the disconnectID setting for the user.
Output
afp:command = "cancelDisconnect" afp:timeStamp = "<time>" afp:status = <status>
Description The time at which the command was issued. A command status code: 0 = command successful
74
Parameter statistic
Description The value you want to display. Valid values: v1 - number of connected users (average during sampling period) v2 - throughput (bytes/sec) The length of time in seconds, ending with the current time, for which you want to see samples. For example, to see 30 minutes of data, you would specify afp:timeScale = 1800.
scale
Output
afp:nbSamples = <samples> afp:samplesArray:_array_index:0:vn = <sample> afp:samplesArray:_array_index:0:t = <time> afp:samplesArray:_array_index:1:vn = <sample> afp:samplesArray:_array_index:1:t = <time> [...] afp:samplesArray:_array_index:i:vn = <sample> afp:samplesArray:_array_index:i:t = <time> afp:vnLegend = "<legend>" afp:currentServerTime = <servertime>
Description The total number of samples listed. A textual description of the selected statistic. "CONNECTIONS" for v1 "THROUGHPUT" for v2 The numerical value of the sample. For connections (v1), this is integer average number of users. For throughput, (v2), this is integer bytes per second. The time at which the sample was measured. A standard UNIX time (number of seconds since Sep 1, 1970.) Samples are taken every 60 seconds.
<sample>
<time>
75
You can use the serveradmin getLogPaths command to see where the current AFP error and activity logs are located. To display the log paths:
$ sudo serveradmin command afp:command = getLogPaths
Output
afp:accesslog = <access-log> afp:errorlog = <error-log>
Value <access-log>
Description The location of the AFP service access log. Default = /Library/Logs/AppleFileService/ AppleFileServiceAccess.log The location of the AFP service error log. Default = /Library/Logs/AppleFileService/ AppleFileServiceError.log
<error-log>
NFS Service
Starting and Stopping NFS Service
NFS service is started automatically when a share point is exported using NFS. The NFS daemons that satisfy client requests continue to run until there are no more NFS exports and the server is restarted.
76
useTCP useUDP
FTP Service
Starting FTP Service
To start FTP service:
$ sudo serveradmin start ftp
To list a group of settings: You can list a group of settings that have part of their names in common by typing only as much of the name as you want, stopping at a colon (:), and typing an asterisk (*) as a wildcard for the remaining parts of the name. For example,
$ sudo serveradmin settings ftp:logCommands:*
77
Parameter setting
Description An FTP service setting. To see a list of available settings, type $ sudo serveradmin settings ftp or see FTP Settings on this page. An appropriate value for the setting.
value
FTP Settings
Use the following parameters with the serveradmin command to change settings for the FTP service.
Parameter (ftp:) administratorEmailAddress anonymous-root anonymousAccessPermitted authLevel bannerMessage Default = "user@hostname" Default = "/Library/FTPServer/FTPRoot" Default = no Default = "STANDARD" Default = "This is the "Banner" message for the Mac OS X Server's FTP server process. FTP clients will receive this message immediately before being prompted for a name and password. PLEASE NOTE: Some FTP clients may exhibit problems if you make this file too long. ----------------------------------" chrootType Default = "STANDARD"
78
Parameter (ftp:) logCommands:anonymous logCommands:guest logCommands:real loginFailuresPermitted logSecurity:anonymous logSecurity:guest logSecurity:real logToSyslog logTransfers:anonymous:inbound logTransfers:anonymous:outbound logTransfers:guest:inbound logTransfers:guest:outbound logTransfers:real:inbound logTransfers:real:outbound maxAnonymousUsers maxRealUsers showBannerMessage showWelcomeMessage welcomeMessage Default = no Default = no Default = no Default = 3 Default = no Default = no Default = no Default = no Default = yes Default = yes Default = no Default = no Default = yes Default = yes Default = 50 Default = 50 Default = yes Default = yes Default = "This is the "Welcome" message for the Mac OS X Server's FTP server process. FTP clients will receive this message right after a successful log in. ----------------------------------"
79
Description Show location of the FTP transfer log file. See Viewing the FTP Transfer Log on this page. Equivalent to the standard serveradmin settings command, but also returns a setting indicating whether the service needs to be restarted. See Determining Whether a Service Needs to be Restarted on page 19.
The default location of log-file is /Library/Logs/FTP.transger.log. You can use the serveradmin getLogPaths command to see where the current transfer log is located. To display the log path:
$ sudo serveradmin command ftp:command = getLogPaths
or
$ sudo serveradmin command ftp:command = getConnectedUsers
80
Parameter setting
Description An SMB service setting. To see a list of available settings, type $ sudo serveradmin settings smb or see List of SMB Service Settings on page 82.
To list a group of settings: You can list a group of settings that have part of their names in common by typing only as much of the name as you want, stopping at a colon (:), and typing an asterisk (*) as a wildcard for the remaining parts of the name. For example,
$ sudo serveradmin settings smb:adminCommands:*
Parameter setting
Description An SMB service setting. To see a list of available settings, type $ sudo serveradmin settings smb or see List of SMB Service Settings on page 82. An appropriate value for the setting. For a list of values that correspond to GUI controls in the Server Admin application, see List of SMB Service Settings on page 82.
value
81
adminCommands:serverRole
domain master
dos charset
82
Description Whether the server is providing workgroup master browser service. Can be set to: yes | no Corresponds to the Workgroup Master Browser checkbox in the Advanced pane of Window service settings in the Server Admin GUI application. The amount of detail written to the service logs. Can be set to: 0 (Low: errors and warnings only) 1 (Medium: service start and stop, authentication failures, browser name registrations, and errors and warnings) 2 (High: service start and stop, authentication failures, browser name registration events, log file access, and errors and warnings) Corresponds to the Log Detail pop-up menu in the Logging pane of Window service settings in the Server Admin GUI application Whether guest access is allowed. Can be set to: "Never" (No guest access) "Bad User" (Allow guest access) Corresponds to the Allow Guest access checkbox in the Access pane of Window service settings in the Server Admin GUI application The maximum allowed number of smb server processes. Each connection uses its own smbd process, so this is the same as specifying the maximum number of SMB connections. 0 means unlimited. This corresponds to the maximum client connections field in the Access pane of the Windows service settings in the Server Admin GUI application. The servers NetBIOS name. Can be set to a maximum of 15 bytes of UTF-8 characters. Corresponds to the Computer Name field in the General pane of the Windows service settings in the Server Admin GUI application. Text that helps identify the server in the network browsers of client computers. Can be set to a maximum of 15 bytes of UTF-8 characters. Corresponds to the Description field in the General pane of the Windows service settings in the Server Admin GUI application. Whether the server provides WINS support. Can be set to: yes | no Corresponds to the WINS Registration Off and Enable WINS server selections in the Advanced pane of the Windows service settings in the Server Admin GUI application.
log level
map to guest
netbios name
server string
wins support
83
Description The name of the WINS server used by the server. Corresponds to the WINS Registration Register with WINS server selection and field in the Advanced pane of the Windows service settings in the Server Admin GUI application. The servers workgroup. Can be set to a maximum of 15 bytes of UTF-8 characters. Corresponds to the Workgroup field in the General pane of the Windows service settings in the Server Admin GUI application.
workgroup
84
Output The following array of settings is displayed for each connected user:
smb:usersArray:_array_index:i:disconnectID = <disconnectID> smb:usersArray:_array_index:i:sessionID = <sessionID> smb:usersArray:_array_index:i:connectAt = <connect-time> smb:usersArray:_array_index:i:service = <service> smb:usersArray:_array_index:i:loginElapsedTime = <login-elapsed-time> smb:usersArray:_array_index:i:name = "<name>" smb:usersArray:_array_index:i:ipAddress = "<ip-address>"
Value returned by getConnectedUsers (smb:usersArray:_array_index:<n>:) <sessionID> <connect-time> <service> <login-elapsed-time> <name> <ip-address>
Description An integer that identifies the user session. The date and time when the user connected to the server. The share point the user is accessing. The elapsed time since the user connected. The users name. The users IP address.
Parameter sessionidn
Description The session ID of a user you want to disconnect. To list the session IDs of connected users, use the getConnectedUsers command. See Listing SMB Users on page 84.
Output
smb:command = "disconnectUsers" smb:status = <status>
Value <status>
85
Parameter v1 scale
Description The number of connected users (average during sampling period). The length of time in seconds, ending with the current time, for which you want to see samples. For example, to see 30 minutes of data, you would specify smb:timeScale = 1800.
Output
smb:nbSamples = <samples> smb:samplesArray:_array_index:0:vn = <sample> smb:samplesArray:_array_index:0:t = <time> smb:samplesArray:_array_index:1:vn = <sample> smb:samplesArray:_array_index:1:t = <time> [...] smb:samplesArray:_array_index:i:vn = <sample> smb:samplesArray:_array_index:i:t = <time> smb:v1Legend = "CONNECTIONS" smb:currentServerTime = <servertime>
Description The total number of samples listed. A textual description of the selected statistic. "CONNECTIONS" for v1 "THROUGHPUT" for v2 The numerical value of the sample. For connections (v1), this is integer average number of users. For throughput, (v2), this is integer bytes per second. The time at which the sample was measured. A standard UNIX time (number of seconds since Sep 1, 1970.) Samples are taken every 60 seconds.
<sample>
<time>
86
You can use the serveradmin getLogPaths command to see where the current SMB logs are located. To display the log paths:
$ sudo serveradmin command smb:command = getLogPaths
Output
smb:fileServiceLog = <smb-log> smb:nameServiceLog = <name-log>
Description The location of the SMB service log. Default = /var/log/samba/log.smbd The location of the name service log. Default = /var/log/samba/log.nmbd
87
Commands you can use to manage the Print service in Mac OS X Server. Starting and Stopping Print Service
To start Print service:
$ sudo serveradmin start print
To list a group of settings: You can list a group of settings that have part of their names in common by typing only as much of the name as you want, stopping at a colon (:), and typing an asterisk (*) as a wildcard for the remaining parts of the name. For example, to see all settings for a particular print queue:
$ sudo serveradmin settings print:queuesArray:_array_id:queue-id:*
89
Parameter setting
Description A Print service setting. To see a list of available settings, type $ sudo serveradmin settings print or see Print Service Settings on this page. An appropriate value for the setting.
value
90
queuesArray:_array_id:<id>: Default = no quotasEnforced queuesArray:_array_id:<id>: Default = "LPR" sharingList:_array_index:0: service queuesArray:_array_id:<id>: Default = no sharingList:_array_index:0: sharingEnable queuesArray:_array_id:<id>: Default = "SMB" sharingList:_array_index:1: service queuesArray:_array_id:<id>: Default = no sharingList:_array_index:1: sharingEnable queuesArray:_array_id:<id>: Default = "PAP" sharingList:_array_index:2: service queuesArray:_array_id:<id>: Default = no sharingList:_array_index:2: sharingEnable queuesArray:_array_id:<id>: Default = yes. shareable Cannot be changed. queuesArray:_array_id:<id>: Not used. defaultJobPriority Default = "NORMAL" queuesArray:_array_id:<id>: Default = "<printer-name>" printerName Cannot be changed using serveradmin. queuesArray:_array_id:<id>: Not used. defaultJobState Default = "PENDING" queuesArray:_array_id:<id>: Default = <uri> printerURI Format depends on type of printer. Cannot be changed using serveradmin. queuesArray:_array_id:<id>: Default = yes registerRendezvous queuesArray:_array_id:<id>: Default = "<type>" printerKind Cannot be changed using serveradmin. queuesArray:_array_id:<id>: Default = "<name>" sharingName
91
92
Listing Queues
You can use the serveradmin getQueues command to list Print service queues.
$ sudo serveradmin command print:command = getQueues
Pausing a Queue
You can use the serveradmin setQueueState command to pause or release a queue. To pause a queue:
$ sudo serveradmin command print:command = setQueueState print:status = PAUSED print:namesArray:_array_index:0 = queue Control-D
Parameter queue
Description The name of the queue. To find the name of the queue, use the getQueues command and look for the value of the print setting. See Listing Queues on this page.
93
Description The maximum number of jobs to list. The name of the queue. To find the name of the queue, use the getQueues command and look for the value of the print setting. See Listing Queues on page 93.
For each job, the command lists: Document name Number of pages Document size Number of sheets Job ID Submitting user Submitting host Job name Job state Printing protocol Job priority
Holding a Job
You can use the serveradmin setJobState command to hold or release a job. To hold a job:
$ sudo serveradmin command print:command = setJobState print:status = HOLD print:namesArray:_array_index:0:printer = queue
print:namesArray:_array_index:0:idsArray:_array_index:0 = jobid
Control-D
Parameter queue
Description The name of the queue. To find the name of the queue, use the getQueues command and look for the value of the print setting. See Listing Queues on page 93. The ID of the job. To find the ID of the job, use the getJobs command and look for the value of the jobId setting. See Listing Jobs and Job Information on this page.
jobid
94
To release the job for printing, change its state to PENDING. To release the job:
$ sudo serveradmin command print:command = setJobState print:status = PENDING print:namesArray:_array_index:0:printer = queue
print:namesArray:_array_index:0:idsArray:_array_index:0 = jobid
Control-D
You can use the serveradmin getLogPaths command to see where the current logs are located. To display the log paths:
$ sudo serveradmin command print:command = getLogPaths
Output
print:logPathsArray:_array_index:0:path print:logPathsArray:_array_index:0:name print:logPathsArray:_array_index:0:path print:logPathsArray:_array_index:0:path print:logPathsArray:_array_index:0:path print:logPathsArray:_array_index:0:path [...] print:logPathsArray:_array_index:0:path print:logPathsArray:_array_index:0:path = = = = = = <service-log> SYSTEMLOG <job-log-0> <queue-name-0> <job-log-1> <queue-name-1>
= <job-log-n> = <queue-name-n>
Value <service-log>
Description The location of the primary Print service log. Default = /Library/Logs/PrintService/ PrintService.server.log The location of the job log for the corresponding queue. Default = /Library/Logs/PrintService/ PrintService.<queue-name-n>.job.log The name of the queue.
<job-log-n>
<queue-name-n>
95
10
10
Commands you can use to manage the NetBoot service in Mac OS X Server. Starting and Stopping NetBoot Service
To start NetBoot service:
$ sudo serveradmin start netboot
you have not yet enabled NetBoot on any network port. To stop NetBoot service:
$ sudo serveradmin stop netboot
97
Parameter setting
Description A NetBoot service setting. To see a list of available settings, type $ sudo serveradmin settings netboot or see NetBoot Service Settings on this page. An appropriate value for the setting.
value
netBootFiltersRecordsArray...
netBootImagesRecordsArray...
netBootPortsRecordsArray...
98
netBootStorageRecordsArray:_array_index:<n>: clients netBootStorageRecordsArray:_array_index:<n>: ignorePrivs netBootStorageRecordsArray:_array_index:<n>: volType netBootStorageRecordsArray:_array_index:<n>: path netBootStorageRecordsArray:_array_index:<n>: volName netBootStorageRecordsArray:_array_index:<n>: volIcon netBootStorageRecordsArray:_array_index:<n>: okToDeleteClients netBootStorageRecordsArray:_array_index:<n>: okToDeleteSharepoint
netBootFiltersRecordsArray: _array_index:<n>:hardwareAddress
99
100
101
11
11
Commands you can use to manage the Mail service in Mac OS X Server. Starting and Stopping Mail Service
To start Mail service:
$ sudo serveradmin start mail
To list a group of settings: You can list a group of settings that have part of their names in common by typing only as much of the name as you want, stopping at a colon (:), and typing an asterisk (*) as a wildcard for the remaining parts of the name. For example:
$ sudo serveradmin settings mail:imap:*
103
104
postfix:unknown_virtual_mailbox_reject_code Default = 550 postfix:fast_flush_refresh_time postfix:prepend_delivered_header postfix:defer_service_name postfix:sendmail_path postfix:lmtp_sasl_password_maps postfix:smtp_sasl_password_maps postfix:qmgr_clog_warn_time postfix:smtp_sasl_auth_enable postfix:smtp_skip_4xx_greeting postfix:smtp_skip_5xx_greeting postfix:stale_lock_time postfix:strict_8bitmime_body postfix:disable_mime_input_processing postfix:smtpd_hard_error_limit postfix:empty_address_recipient postfix:forward_expansion_filter Default = "12h" Default = "command, file, forward" Default = "defer" Default = "/usr/sbin/sendmail" Default = no Default = no Default = "300s" Default = no Default = yes Default = yes Default = "500s" Default = no Default = no Default = 20 Default = "MAILER-DAEMON" Default = "1234567890!@%_=+:,./abcdefghijklmnopqr stuvwxyzABCDEFGHIJKLMNOPQ RSTUVWXYZ" Default = "\t\40!"#$%&'()*+,./0123456789:;<=>?@ABCDEF GHIJKLMNOPQRSTUVWXYZ[\\]^ _`abcdefghijklmnopqrstuvw xyz{|}~" Default = "" Default = 450 Default = "300s" Default = "" Default = "" Default = 554
postfix:smtpd_expansion_filter
105
Parameter (mail:) postfix:line_length_limit postfix:mailbox_transport postfix:deliver_lock_delay postfix:best_mx_transport postfix:notify_classes postfix:mailbox_command postfix:mydomain postfix:mailbox_size_limit postfix:default_verp_delimiters postfix:resolve_dequoted_address postfix:cleanup_service_name postfix:header_address_token_limit postfix:lmtp_connect_timeout postfix:strict_7bit_headers postfix:unknown_hostname_reject_code postfix:virtual_alias_domains postfix:lmtp_sasl_auth_enable postfix:queue_directory postfix:sample_directory postfix:fallback_relay postfix:smtpd_use_pw_server postfix:smtpd_sasl_auth_enable postfix:mail_owner postfix:command_time_limit postfix:verp_delimiter_filter postfix:qmqpd_authorized_clients postfix:virtual_mailbox_base postfix:permit_mx_backup_networks postfix:queue_run_delay postfix:virtual_mailbox_domains
Description Default = 2048 Default = 0 Default = "1s" Default = 0 Default = "resource,software" Default = "" Default = <domain> Default = 51200000 Default = "+=" Default = yes Default = "cleanup" Default = 10240 Default = "0s" Default = no Default = 450 Default = "$virtual_alias_maps" Default = no Default = "/private/var/ spool/postfix" Default = "/usr/share/doc/ postfix/examples" Default = 0 Default = "yes" Default = no Default = "postfix" Default = "1000s" Default = "-=+" Default = 0 Default = "" Default = "" Default = "1000s" Default = "$virtual_mailbox_maps"
106
Parameter (mail:) postfix:local_transport postfix:smtpd_helo_restrictions postfix:fork_delay postfix:disable_mime_output_conversion postfix:mynetworks:_array_index:0 postfix:smtp_never_send_ehlo postfix:lmtp_cache_connection postfix:local_recipient_maps
Description Default = "local:$myhostname" Default = no Default = "1s" Default = no Default = "127.0.0.1/32" Default = no Default = yes Default = "proxy:unix:passwd.byname $alias_maps" Default = "300s" Default = no Default = "1s" Default = yes Default = "/var/mail" Default = "flock" Default = no Default = "" Default = 20 Default = "postmaster" Default = "$virtual_maps" Default = "/usr/bin/mailq" Default = no Default = "" Default = "postmaster" Default = "$myhostname" Default = "flush" Default = "60s" Default = "MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY" Default = no Default = "$mynetworks" Default = "" Default = 2048 Default = 5
postfix:smtpd_timeout postfix:require_home_directory postfix:smtpd_error_sleep_time postfix:helpful_warnings postfix:mail_spool_directory postfix:mailbox_delivery_lock postfix:disable_dns_lookups postfix:mailbox_command_maps postfix:default_destination_concurrency _limit postfix:2bounce_notice_recipient postfix:virtual_alias_maps postfix:mailq_path postfix:recipient_delimiter postfix:masquerade_exceptions postfix:delay_notice_recipient postfix:smtp_helo_name postfix:flush_service_name postfix:service_throttle_time postfix:import_environment
107
Description Default = "debug_peer_list,fast_flu sh_domains,mynetworks,per mit_mx_backup_networks,qm qpd_authorized_clients,re lay_domains,smtpd_access_ maps" Default = "postdrop" Default = "$header_checks" Default = "" Default = "relay" Default = "localhost" Default = "" Default = "0h" Default = "hash:/etc/aliases" Default = "" Default = "10s" Default = "/usr/bin/newaliases" Default = "$rbl_code Service unavailable; $rbl_class [$rbl_what] blocked using $rbl_domain${rbl_reason?; $rbl_reason}" Default = "hash:/etc/aliases" Default = 20000 Default = 10240 Default = 0 Default = "mail" Default = "" Default = "" Default = 20 Default = "" Default = "none" Default = "100s" Default = "2.0.7" Default = "60s"
postfix:setgid_group postfix:mime_header_checks postfix:smtpd_etrn_restrictions postfix:relay_transport postfix:inet_interfaces postfix:smtpd_sender_restrictions postfix:delay_warning_time postfix:alias_maps postfix:sender_canonical_maps postfix:trigger_timeout postfix:newaliases_path postfix:default_rbl_reply
postfix:alias_database postfix:qmgr_message_recipient_limit postfix:extract_recipient_limit postfix:header_checks postfix:syslog_facility postfix:luser_relay postfix:maps_rbl_domains:_array_index:0 postfix:deliver_lock_attempts postfix:smtpd_data_restrictions postfix:smtpd_pw_server_security_options: _array_index:0 postfix:ipc_idle postfix:mail_version postfix:transport_retry_time
108
Parameter (mail:) postfix:virtual_mailbox_limit postfix:smtpd_noop_commands postfix:mail_release_date postfix:append_at_myorigin postfix:body_checks_size_limit postfix:qmgr_message_active_limit postfix:mail_name postfix:masquerade_classes
Description Default = 51200000 Default = 0 Default = "20030319" Default = yes Default = 51200 Default = 20000 Default = "Postfix" Default = "envelope_sender, header_sender, header_recipient" Default = no Default = yes Default = no Default = yes Default = "pid" Default = no Default = 0 Default = yes Default = "smtp" Default = yes Default = 554 Default = yes Default = "300s" Default = "300s" Default = "7d" Default = no Default = no Default = "/usr/libexec/postfix"
postfix:allow_min_user postfix:smtp_randomize_addresses postfix:alternate_config_directories postfix:allow_percent_hack postfix:process_id_directory postfix:strict_rfc821_envelopes postfix:fallback_transport postfix:owner_request_special postfix:default_transport postfix:biff postfix:relay_domains_reject_code postfix:smtpd_delay_reject postfix:lmtp_quit_timeout postfix:lmtp_mail_timeout postfix:fast_flush_purge_time postfix:disable_verp_bounces postfix:lmtp_skip_quit_response postfix:daemon_directory
postfix:default_destination_recipient_limit Default = 50 postfix:smtp_skip_quit_response postfix:smtpd_recipient_limit postfix:virtual_gid_maps postfix:duplicate_filter_limit postfix:rbl_reply_maps postfix:relay_recipient_maps postfix:syslog_name Default = yes Default = 1000 Default = "" Default = 1000 Default = "" Default = 0 Default = "postfix"
109
Description Default = "qmgr" Default = "" Default = "$default_destination_con currency_limit" Default = "fcntl" Default = 100 Default = "3600s" Default = 50 Default = "" Default = 100 Default = 5 Default = "nobody" Default = no Default = "$header_checks" Default = no Default = 2 Default = "1s" Default = 100 Default = "/usr/libexec/postfix" Default = "300s" Default = "300s" Default = "1000s" Default = 100 Default = no Default = "" Default = "$myhostname" Default = "localhost.$mydomain" Default = "error" Default = "noanonymous" Default = "<>" Default = "" Default = 100 Default = "500s"
postfix:virtual_mailbox_lock postfix:qmgr_fudge_factor postfix:ipc_timeout postfix:default_delivery_slot_discount postfix:relocated_maps postfix:max_use postfix:default_delivery_slot_cost postfix:default_privs postfix:smtp_bind_address postfix:nested_header_checks postfix:canonical_maps postfix:debug_peer_level postfix:in_flow_delay postfix:smtpd_junk_command_limit postfix:program_directory postfix:smtp_quit_timeout postfix:smtp_mail_timeout postfix:minimal_backoff_time postfix:queue_file_attribute_count_limit postfix:body_checks postfix:smtpd_client_restrictions: _array_index:0 postfix:mydestination:_array_index:0 postfix:mydestination:_array_index:1 postfix:error_service_name postfix:smtpd_sasl_security_options: _array_index:0 postfix:smtpd_null_access_lookup_key postfix:virtual_uid_maps postfix:smtpd_history_flush_threshold postfix:smtp_pix_workaround_threshold_time
110
Parameter (mail:) postfix:showq_service_name postfix:smtp_pix_workaround_delay_time postfix:lmtp_sasl_security_options postfix:bounce_size_limit postfix:qmqpd_timeout postfix:allow_mail_to_files postfix:relay_domains postfix:smtpd_banner postfix:smtpd_helo_required postfix:berkeley_db_read_buffer_size postfix:swap_bangpath postfix:maximal_queue_lifetime postfix:ignore_mx_lookup_error postfix:mynetworks_style postfix:myhostname postfix:default_minimum_delivery_slots postfix:recipient_canonical_maps postfix:hash_queue_depth postfix:hash_queue_names:_array_index:0 postfix:hash_queue_names:_array_index:1 postfix:hash_queue_names:_array_index:2 postfix:hash_queue_names:_array_index:3 postfix:hash_queue_names:_array_index:4 postfix:hash_queue_names:_array_index:5 postfix:hash_queue_names:_array_index:6 postfix:lmtp_tcp_port postfix:local_command_shell postfix:allow_mail_to_commands postfix:non_fqdn_reject_code postfix:maximal_backoff_time postfix:smtp_always_send_ehlo
Description Default = "showq" Default = "10s" Default = "noplaintext, noanonymous" Default = 50000 Default = "300s" Default = "alias,forward" Default = "$mydestination" Default = "$myhostname ESMTP $mail_name" Default = no Default = 131072 Default = yes Default = "5d" Default = no Default = "host" Default = "<hostname>" Default = 3 Default = no Default = 1 Default = "incoming" Default = "active" Default = "deferred" Default = "bounce" Default = "defer" Default = "flush" Default = "hold" Default = 24 Default = 0 Default = "alias,forward" Default = 504 Default = "4000s" Default = yes
111
Description Default = "$local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks" Default = "canonical, virtual" Default = "$default_destination_ recipient_limit" Default = "" Default = 100 Default = "" Default = "bounce" Default = 102400 Default = no Default = "virtual" Default = 16777216 Default = no Default = no Default = "" Default = "$home/.forward${recipien t_delimiter}${extension}, $home/.forward" Default = "1s" Default = "/usr/share/man" Default = 50 Default = 550 Default = "" Default = "rewrite" Default = 450
postfix:propagate_unmatched_extensions postfix:smtp_destination_recipient_limit
postfix:smtpd_restriction_classes postfix:mime_nesting_limit postfix:virtual_mailbox_maps postfix:bounce_service_name postfix:header_size_limit postfix:strict_8bitmime postfix:virtual_transport postfix:berkeley_db_create_buffer_size postfix:broken_sasl_auth_clients postfix:home_mailbox postfix:content_filter postfix:forward_path
112
Description Default = yes Default = "1234567890!@%_=+:,./abcdefghijklmnopqr stuvwxyzABCDEFGHIJKLMNOPQ RSTUVWXYZ" Default = 1000 Default = "600s" Default = "$myhostname" Default = "120s" Default = "180s" Default = "600s" Default = "120s" Default = "180s" Default = 3 Default = 554 Default = "/usr/sbin" Default = "300s" Default = "noplaintext, noanonymous" Default = 554 Default = "300s" Default = "postmaster" Default = "30s" Default = 0 Default = 450 Default = 100 Default = "$relay_domains" Default = "hash" Default = 0 Default = no Default = "100s" Default = "" Default = 10 Default = 501 Default = 5 Default = no Default = "DEFAULT"
postfix:default_extra_recipient_limit postfix:lmtp_data_done_timeout postfix:myorigin postfix:lmtp_data_init_timeout postfix:lmtp_data_xfer_timeout postfix:smtp_data_done_timeout postfix:smtp_data_init_timeout postfix:smtp_data_xfer_timeout postfix:default_delivery_slot_loan postfix:reject_code postfix:command_directory postfix:lmtp_rcpt_timeout postfix:smtp_sasl_security_options postfix:access_map_reject_code postfix:smtp_helo_timeout postfix:bounce_notice_recipient postfix:smtp_connect_timeout postfix:fault_injection_code postfix:unknown_client_reject_code postfix:virtual_minimum_uid postfix:fast_flush_domains postfix:default_database_type postfix:dont_remove postfix:expand_owner_alias postfix:max_idle postfix:defer_transports postfix:qmgr_message_recipient_minimum postfix:invalid_hostname_reject_code postfix:fork_attempts postfix:allow_untrusted_routing imap:tls_cipher_list:_array_index:0
113
Parameter (mail:) imap:umask imap:tls_ca_path imap:pop_auth_gssapi imap:sasl_minimum_layer imap:tls_cert_file imap:poptimeout imap:tls_sieve_require_cert imap:mupdate_server imap:timeout imap:quotawarn imap:enable_pop imap:mupdate_retry_delay imap:tls_session_timeout imap:postmaster imap:defaultacl imap:tls_lmtp_key_file imap:newsprefix imap:userprefix imap:deleteright imap:allowplaintext imap:pop_auth_clear imap:imapidresponse imap:sasl_auto_transition imap:mupdate_port imap:admins:_array_index:0 imap:plaintextloginpause imap:popexpiretime imap:pop_auth_any imap:sieve_maxscriptsize imap:hashimapspool imap:tls_lmtp_cert_file imap:tls_sieve_key_file imap:sievedir imap:debug_command imap:popminpoll imap:tls_lmtp_require_cert
Description Default = "077" Default = "" Default = yes Default = 0 Default = "" Default = 10 Default = no Default = "" Default = 30 Default = 90 Default = no Default = 20 Default = 1440 Default = "postmaster" Default = "anyone lrs" Default = "" Default = "" Default = "Other Users" Default = "c" Default = yes Default = no Default = yes Default = no Default = "" Default = "cyrus" Default = 0 Default = 0 Default = no Default = 32 Default = no Default = "" Default = "" Default = "/usr/sieve" Default = "" Default = 0 Default = no
114
Parameter (mail:) imap:tls_ca_file imap:sasl_pwcheck_method imap:postuser imap:sieve_maxscripts imap:defaultpartition imap:altnamespace imap:max_imap_connections imap:tls_imap_cert_file imap:sieveusehomedir imap:reject8bit imap:tls_sieve_cert_file imap:imapidlepoll imap:srvtab imap:imap_auth_login imap:tls_pop3_cert_file imap:tls_pop3_require_cert imap:lmtp_overquota_perm_failure imap:tls_imap_key_file imap:enable_imap imap:tls_require_cert imap:autocreatequota imap:allowanonymouslogin imap:pop_auth_apop imap:partition-default imap:imap_auth_cram_md5 imap:mupdate_password imap:idlesocket imap:allowallsubscribe imap:singleinstancestore imap:unixhierarchysep imap:mupdate_realm imap:sharedprefix imap:tls_key_file imap:lmtpsocket
Description Default = "" Default = "auxprop" Default = "" Default = 5 Default = "default" Default = yes Default = 100 Default = "" Default = no Default = no Default = "" Default = 60 Default = "/etc/srvtab" Default = no Default = "" Default = no Default = no Default = "" Default = no Default = no Default = 0 Default = no Default = yes Default = "/var/spool/imap" Default = no Default = "" Default = "/var/imap/socket/idle" Default = no Default = yes Default = "yes" Default = "" Default = "Shared Folders" Default = "" Default = "/var/imap/socket/lmtp"
115
Parameter (mail:) imap:configdirectory imap:sasl_maximum_layer imap:sendmail imap:loginuseacl imap:mupdate_username imap:imap_auth_plain imap:imap_auth_any imap:duplicatesuppression imap:notifysocket imap:tls_imap_require_cert imap:imap_auth_clear imap:tls_pop3_key_file imap:proxyd_allow_status_referral imap:servername imap:logtimestamps imap:imap_auth_gssapi imap:mupdate_authname mailman:enable_mailman
Description Default = "/var/imap" Default = 256 Default = "/usr/sbin/sendmail" Default = no Default = "" Default = no Default = no Default = yes Default = "/var/imap/socket/notify" Default = no Default = yes Default = "" Default = no Default = "<hostname>" Default = no Default = no Default = "" Default = no
116
Parameter statistic
Description The value you want to display. Valid values: v1 - number of connected users (average during sampling period) v2 - data throughput (bytes/sec) The length of time in seconds, ending with the current time, for which you want to see samples. For example, to see 24 hours of data, you would specify mail:timeScale = 86400.
scale
Output
mail:nbSamples = <samples> mail:v2Legend = "throughput" mail:samplesArray:_array_index:0:vn = <sample> mail:samplesArray:_array_index:0:t = <time> mail:samplesArray:_array_index:1:vn = <sample> mail:samplesArray:_array_index:1:t = <time> [...] mail:samplesArray:_array_index:i:vn = <sample> mail:samplesArray:_array_index:i:t = <time> mail:v1Legend = "connections" afp:currentServerTime = <servertime>
Description The total number of samples listed. The numerical value of the sample. For connections (v1), this is integer average number of users. For throughput, (v2), this is integer bytes per second. The time at which the sample was measured. A standard UNIX time (number of seconds since Sep 1, 1970.) Samples are taken every 60 seconds.
<time>
117
You can use the serveradmin getLogPaths command to see where the Mail service logs are located. To display the log locations:
$ sudo serveradmin command mail:command = getLogPaths
Output
mail:Server Log = <server-log> mail:Lists qrunner = <lists-log> mail:Lists post = <postings-log> mail:Lists smtp = <delivery-log> mail:Lists subscribe = <subscriptions-log> mail:SMTP Log = <smtp-log> mail:POP Log = <pop-log> mail:Lists error = <listerrors-log> mail:IMAP Log = <imap-log> mail:Lists smtp-failure = <failures-log>
Value <server-log> <lists-log> <postings-log> <delivery-log> <subscriptions-log> <smtp-log> <pop-log> <listerrors-log> <imap-log> <failures-log>
Description The location of the server log. Default = srvr.log The location of the Mailing Lists log. Default = /private/var/mailman/logs/qrunner The location of the Mailing Lists Postings log. Default = /private/var/mailman/logs/post The location of the Mailing Lists Delivery log. Default = /private/var/mailman/logs/smtp The location of the Mailing Lists Subscriptions log. Default = /private/var/mailman/logs/subscribe The location of the server log. Default = smtp.log The location of the server log. Default = pop3.log The location of the Mailing Lists Error log. Default = /private/var/mailman/logs/error The location of the server log. Default = imap.log The location of the Mailing Lists Delivery Failures log. Default = /private/var/mailman/logs/smtp-failure
118
This use of the certtool command begins an interactive process that generates a Certificate Signing Request (CSR) in the file csr.txt and creates a keychain named certkc. 3 In the New Keychain Passphrase dialog that appears, enter a passphrase or password for the keychain youre creating, enter the password or passphrase a second time to verify it, and click OK. Remember this passphrase, because later you must supply it again. 4 When Enter key and certificate label: appears in the Terminal window, type a oneword key, a blank space, and a one-word certificate label, then press Return. For example, you could type your organizations name as the key and mailservice as the certificate label. 5 Type r when prompted to select a key algorithm, then press Return.
Please specify parameters for the key pair you will generate. r RSA d DSA f FEE Select key algorithm by letter:
Larger key sizes are more secure, but require more processing time on your server. Key sizes smaller than 1024 arent accepted by some certificate-issuing authorities.
119
7 Type y when prompted to confirm the algorithm and key size, then press Return.
You have selected algorithm RSA, key size (size entered above) bits. OK (y/anything)?
8 Type b when prompted to specify how this certificate will be used, then press Return.
Enter cert/key usage (s=signing, b=signing AND encrypting):
10 Type y when asked to confirm the selected algorithm, then press Return.
You have selected algorithm RSA with SHA1. OK (y/anything)?
11 Enter a phrase or some random text when prompted to enter a challenge string, then press Return.
...creating CSR... Enter challenge string:
12 Enter the correct information at the next five prompts, which request the various components of the certificates Relative Distinguished Name (RDN), pressing return after each entry.
For Common Name, enter the server's DNS name, such as server.example.com. For Country, enter the country in which your organization is located. For Organization, enter the organization to which your domain name is registered. For Organizational Unit, enter something similar to a department name. For State/Province, enter the full name of your state or province.
13 Type y when asked to confirm the information you entered, then press Return.
Is this OK (y/anything)?
When you see a message about writing to csr.txt, you have successfully generated a CSR and created the keychain that Mail service needs for SSL connections.
Wrote (n) bytes of CSR to csr.txt
120
Using certtool this way imports a certificate from the file named sslcert.txt into the keychain named certkc. A message on screen confirms that the certificate was successfully imported.
...certificate successfully imported.
121
Mail service of Mac OS X Server can now use SSL for secure IMAP connections. 7 Log out as root. Note: If Mail service is running, you need to stop it and start it again to make it recognize the new certificate keychain.
122
12
12
Commands you can use to manage Web service in Mac OS X Server. Starting and Stopping Web Service
To start Web service:
$ sudo serveradmin start web
123
To list a group of settings: You can list a group of settings that have part of their names in common by typing only as much of the name as you want, stopping at a colon (:), and typing an asterisk (*) as a wildcard for the remaining parts of the name. For example,
$ sudo serveradmin settings web:IFModule:_array_id:mod_alias.c:*
Description A Web service setting. To see a list of available settings, type $ sudo serveradmin settings web An appropriate value for the setting.
124
You can use the serveradmin getLogPaths command to see where the current error and activity logs for each site are located. To display the log paths:
$ sudo serveradmin command web:command = getLogPaths
125
Parameter statistic
Description The value you want to display. Valid values: v1 - number of requests per second v2 - throughput (bytes/sec) v3 - cache requests per second v4 - cache throughput (bytes/sec) The length of time in seconds, ending with the current time, for which you want to see samples. For example, to see 30 minutes of data, you would specify qtss:timeScale = 1800.
scale
Output
web:nbSamples = <samples> web:samplesArray:_array_index:0:vn = <sample> web:samplesArray:_array_index:0:t = <time> web:samplesArray:_array_index:1:vn = <sample> web:samplesArray:_array_index:1:t = <time> [...] web:samplesArray:_array_index:i:vn = <sample> web:samplesArray:_array_index:i:t = <time> web:vnLegend = "<legend>" web:currentServerTime = <servertime>
Description The total number of samples listed. A textual description of the selected statistic. "REQUESTS_PER_SECOND" for v1 "THROUGHPUT" for v2 "CACHE_REQUESTS_PER_SECOND" for v3 "CACHE_THROUGHPUT" for v4 The numerical value of the sample. The time at which the sample was measured. A standard UNIX time (number of seconds since Sep 1, 1970.) Samples are taken every 60 seconds.
<sample> <time>
126
127
web:Sites:_array_id:_ipaddr\:_port__servername:ErrorDocument:_array_index:0: StatusCode = 404 web:Sites:_array_id:_ipaddr\:_port__servername:ErrorDocument:_array_index:0: Document = "/nwesite_notfound.html" web:Sites:_array_id:_ipaddr\:_port__servername:LogLevel = "warn" web:Sites:_array_id:_ipaddr\:_port__servername:IfModule:_array_id:mod_ssl.c: SSLEngine = no web:Sites:_array_id:_ipaddr\:_port__servername:IfModule:_array_id:mod_ssl.c: SSLPassPhrase = "" web:Sites:_array_id:_ipaddr\:_port__servername:IfModule:_array_id:mod_ssl.c: SSLLog = "/private/var/log/httpd/ssl_engine_log" web:Sites:_array_id:_ipaddr\:_port__servername:DocumentRoot = "_docroot" web:Sites:_array_id:_ipaddr\:_port__servername
Description The IP address for the site. The port number to be used to for HTTP access to the site. The name of the site. The root directory for the sites files and subdirectories.
If you get the message command not found when you try to run the script, precede the command with the full path to the script file. For example,
/users/admin/documents/addsite 10.0.0.2 80 corpsite /users/webmaster/sites/corpsite
Or, use cd to change to the directory that contains the file and precede the command with ./. For example:
$ cd /users/admin/documents $ ./addsite 10.0.0.2 80 corpsite /users/webmaster/sites/corpsite
128
13
13
Commands you can use to manage DHCP, DNS, Firewall, NAT, and VPN service in Mac OS X Server. DHCP Service
Starting and Stopping DHCP Service
To start DHCP service:
$ sudo serveradmin start dhcp
To list a group of settings: You can list a group of settings that have part of their names in common by typing only as much of the name as you want, stopping at a colon (:), and typing an asterisk (*) as a wildcard for the remaining parts of the name. For example,
$ sudo serveradmin settings dhcp:subnets:*
129
Parameter setting
Description A DHCP service setting. To see a list of available settings, type $ sudo serveradmin settings dhcp or see DHCP Service Settings on this page and DHCP Subnet Settings Array on page 131. An appropriate value for the setting.
value
subnet_status subnet_defaults:logVerbosity
subnet_defaults:logVerbosityList: Available values for the logVerbosity setting. _array_index:n Default = "LOW," "MEDIUM," and "HIGH" subnet_defaults:WINS_node_type subnet_defaults:routers Default = "NOT_SET" Default = empty_dictionary
subnet_defaults:selected_port_key Default = en0 subnet_defaults:selected_port_key An array of available ports. _list:_array_index:n subnet_defaults:dhcp_domain_name Default = The last portion of the servers host name, for example, company.com.
130
Parameter (dhcp:)
Description
subnet_defaults:dhcp_domain_name_ Default = The DNS server addresses provided server:_array_index:n during server setup, as listed in the Network pane of the servers System Preferences. subnets:_array_id:<subnetID>... An array of settings for a particular subnet. <subnetID> is a unique identifier for each subnet. See DHCP Subnet Settings Array on this page.
dhcp_domain_name
dhcp_domain_name_server: _array_index:n
dhcp_enabled
131
Subnet Parameter subnets:_array_id:<subnetID>: Description lease_time_secs Lease time in seconds. Default = "3600" Corresponds to the Lease Time pop-up menu and field in the General pane of the subnet settings in the Server Admin GUI application. The IPv4 network address for the subnet. The subnet mask for the subnet. Corresponds to the Subnet Mask field in the General pane of the subnet settings in the Server Admin GUI application. The highest available IPv4 address for the subnet. Corresponds to the Ending IP Address field in the General pane of the subnet settings in the Server Admin GUI application. The lowest available IPv4 address for the subnet. Corresponds to the Starting IP Address field in the General pane of the subnet settings in the Server Admin GUI application. The network port for the subnet. Corresponds to the Network Interface pop-up menu in the General pane of the subnet settings in the Server Admin GUI application. The NetBIOS Datagram Distribution Server IPv4 address. Corresponds to the NBDD Server field in the WINS pane of the subnet settings in the Server Admin GUI application. The WINS node type. Can be set to: "" (not set, default) BROADCAST_B_NODE PEER_P_NODE MIXED_M_NODE HYBRID-H-NODE Corresponds to the NBT Node Type field in the WINS pane of the subnet settings in the Server Admin GUI application. The primary WINS server to be used by clients. Corresponds to the WINS/NBNS Primary Server field in the WINS pane of the subnet settings in the Server Admin GUI application.
net_address net_mask
net_range_end
net_range_start
selected_port_name
WINS_NBDD_server
WINS_node_type
WINS_primary_server
132
Subnet Parameter subnets:_array_id:<subnetID>: Description WINS_scope_id A domain name such as apple.com. Default = "" Corresponds to the NetBIOS Scope ID field in the WINS pane of the subnet settings in the Server Admin GUI application. The secondary WINS server to be used by clients. Corresponds to the WINS/NBNS Secondary Server field in the WINS pane of the subnet settings in the Server Admin GUI application.
WINS_secondary_server
133
Parameter subnetID
Description A unique number that identifies the subnet. Can be any number not already assigned to another subnet defined on the server. Can include embedded hyphens (-). To specify additional DNS servers, add additional dhcp_name_server settings, incrementing _array_index:n for each additional value. The standard subnet settings described under DHCP Subnet Settings Array on page 131.
dns-server-n
Other parameters
You can use the serveradmin getLogPaths command to see where the current DHCP log is located. To display the log path:
$ sudo serveradmin command dhcp:command = getLogPaths
Output
dhcp:systemLog = <system-log>
Value <system-log>
134
DNS Service
Starting and Stopping the DNS Service
To start DNS service:
$ sudo serveradmin start dns
To list a group of settings: Type only as much of the name as you want, stopping at a colon (:), then type an asterisk (*) as a wildcard for the remaining parts of the name. For example,
$ sudo serveradmin settings dns:zone:_array_id:localhost:*
135
You can use the serveradmin getLogPaths command to see where the current DNS log is located. The default is /Library/Logs/named.log. To display the log path:
$ sudo serveradmin command dns:command = getLogPaths
Sample Output
dns:queriesArray:_array_index:0:name = "NS_QUERIES" dns:queriesArray:_array_index:0:value = -1 dns:queriesArray:_array_index:1:name = "A_QUERIES" dns:queriesArray:_array_index:1:value = -1 dns:queriesArray:_array_index:2:name = "CNAME_QUERIES" dns:queriesArray:_array_index:2:value = -1 dns:queriesArray:_array_index:3:name = "PTR_QUERIES" dns:queriesArray:_array_index:3:value = -1 dns:queriesArray:_array_index:4:name = "MX_QUERIES" dns:queriesArray:_array_index:4:value = -1 dns:queriesArray:_array_index:5:name = "SOA_QUERIES" dns:queriesArray:_array_index:5:value = -1 dns:queriesArray:_array_index:6:name = "TXT_QUERIES" dns:queriesArray:_array_index:6:value = -1 dns:nxdomain = 0 dns:nxrrset = 0 dns:reloadedTime = "" dns:success = 0 dns:failure = 0 dns:recursion = 0 dns:startedTime = "2003-09-10 11:24:03 -0700" dns:referral = 0
Firewall Service
Starting and Stopping Firewall Service
To start Firewall service:
$ sudo serveradmin start ipfilter
136
To list a group of settings: Type only as much of the name as you want, stopping at a colon (:), then type an asterisk (*) as a wildcard for the remaining parts of the name. For example,
$ sudo serveradmin settings ipfilter:ipAddressGroups:*
Description A IPFilter service setting. See Firewall Service Settings on this page. An appropriate value for the setting.
137
Description Specifies whether to log all denials. Default = no The address of a defined IP address group, the first element of an array that defines an IP address group. The name of a defined IP address group, the second element of an array that defines an IP address group. Whether to log access allowed by rules. Default = no
IPFilter Groups With Rules Array An array of the following settings is included in the IPFilter settings for each defined IP address group. These arrays arent part of a standard ipfw configuration, but are created by the Server Admin GUI application to implement the IP Address groups on the General pane of the Firewall service settings. In an actual list of settings, <group> is replaced with an IP address group.
Parameter (ipfilter:) ipAddressGroupsWithRules: _array_id:<group>:rules ipAddressGroupsWithRules: _array_id:<group>:addresses ipAddressGroupsWithRules: _array_id:<group>:name ipAddressGroupsWithRules: _array_id:<group>:readOnly Description An array of rules for the group. The groups address. The groups name. Whether the group is set for read-only.
138
139
Adding Rules Using serveradmin If you prefer not to work with the ipfw.conf file, you can use the serveradmin settings command to add firewall rules to your configuration. Note: Be sure to include the special first setting (ending with = create). This is how you tell serveradmin to create the necessary rule array with the specified rule number. To add a subnet:
$ sudo serveradmin settings ipfilter:rules:_array_id:rule = create ipfilter:rules:_array_id:rule:source = source ipfilter:rules:_array_id:rule:protocol = protocol ipfilter:rules:_array_id:rule:destination = destination ipfilter:rules:_array_id:rule:action = action ipfilter:rules:_array_id:rule:enableLocked = (yes|no) ipfilter:rules:_array_id:rule:enabled = (yes|no) ipfilter:rules:_array_id:rule:log = (yes|no) ipfilter:rules:_array_id:rule:readOnly = (yes|no) ipfilter:rules:_array_id:rule:source-port = port Control-D
Description A unique rule number. The standard rule settings described under IPFilter Rules Array on page 141.
Example:
$ sudo serveradmin settings ipfilter:rules:_array_id:1111 = create ipfilter:rules:_array_id:1111:source = "10.10.41.60" ipfilter:rules:_array_id:1111:protocol = "udp" ipfilter:rules:_array_id:1111:destination = "any via en0" ipfilter:rules:_array_id:1111:action = "allow" ipfilter:rules:_array_id:1111:enableLocked = yes ipfilter:rules:_array_id:1111:enabled = yes ipfilter:rules:_array_id:1111:log = no ipfilter:rules:_array_id:1111:readOnly = yes ipfilter:rules:_array_id:1111:source-port = "" Control-D
140
writeSettings
141
You can use the serveradmin getLogPaths command to see where the current ipfilter service log is located. To display the log path:
$ sudo serveradmin command ipfilter:command = getLogPaths
Output
ipfilter:systemLog = <system-log>
Value <system-log>
NAT Service
Starting and Stopping NAT Service
To start NAT service:
$ sudo serveradmin start nat
142
Parameter setting
Description A NAT service setting. To see a list of available settings, type $ sudo serveradmin settings nat or see NAT Service Settings on this page. An appropriate value for the setting.
value
143
You can use the serveradmin getLogPaths command to see where the current NAT service log is located. To display the log path:
$ sudo serveradmin command nat:command = getLogPaths
Output
nat:natLog = <nat-log>
Value <nat-log>
144
VPN Service
Starting and Stopping VPN Service
To start VPN service:
$ sudo serveradmin start vpn
Parameter setting
Description A VPN service setting. To see a list of available settings, type $ sudo serveradmin settings vpn or see List of VPN Service Settings on page 146. An appropriate value for the setting.
value
145
146
Parameter (vpn:Servers:) com.<name>.ppp.l2tp: PPP:DSACLEnabled com.<name>.ppp.l2tp: PPP:VerboseLogging com.<name>.ppp.l2tp: PPP:AuthenticatorPlugins: _array_index:n com.<name>.ppp.l2tp: PPP:LCPEchoInterval com.<name>.ppp.l2tp: PPP:LCPEchoEnabled com.<name>.ppp.l2tp: PPP:IPCPCompressionVJ com.<name>.ppp.l2tp: PPP:AuthenticatorProtocol: _array_index:n com.<name>.ppp.l2tp: PPP:LogFile com.<name>.ppp.pptp: Server:VerboseLogging com.<name>.ppp.pptp: Server:MaximumSessions com.<name>.ppp.pptp: Server:LogFile com.<name>.ppp.pptp: enabled com.<name>.ppp.pptp: IPv4:DestAddressRanges com.<name>.ppp.pptp: IPv4:OfferedRouteMasks com.<name>.ppp.pptp: IPv4:OfferedRouteAddresses com.<name>.ppp.pptp: IPv4:OfferedRouteTypes com.<name>.ppp.pptp: IPv4:ConfigMethod com.<name>.ppp.pptp: DNS:OfferedSearchDomains com.<name>.ppp.pptp: DNS:OfferedServerAddresses com.<name>.ppp.pptp: DSACL:Group
Default = "/var/log/ppp/vpnd.log" Default = 1 Default = 128 Default = "/var/log/ppp/vpnd.log" Default = no Default = _empty_array Default = _empty_array Default = _empty_array Default = _empty_array Default = "Manual" Default = _empty_array Default = _empty_array Default = ""
147
Parameter (vpn:Servers:) com.<name>.ppp.pptp: Interface:SubType com.<name>.ppp.pptp: Interface:Type com.<name>.ppp.pptp: PPP:CCPProtocols:_array_index:n com.<name>.ppp.pptp: PPP:LCPEchoFailure com.<name>.ppp.pptp: PPP:MPPEKeySize128 com.<name>.ppp.pptp: PPP:DSACLEnabled com.<name>.ppp.pptp: PPP:VerboseLogging com.<name>.ppp.pptp: PPP:AuthenticatorPlugins: _array_index:n com.<name>.ppp.pptp: PPP:MPPEKeySize40 com.<name>.ppp.pptp: PPP:LCPEchoInterval com.<name>.ppp.pptp: PPP:LCPEchoEnabled com.<name>.ppp.pptp: PPP:CCPEnabled com.<name>.ppp.pptp: PPP:IPCPCompressionVJ com.<name>.ppp.pptp: PPP:AuthenticatorProtocol: _array_index:n com.<name>.ppp.pptp: PPP:LogFile
Description Default = "PPTP" Default = "PPP" Default = "MPPE" Default = 5 Default = 1 Default = no Default = 1 Default = "DSAuth"
Default = "/var/log/ppp/vpnd.log"
148
You can use the serveradmin getLogPaths command to see where the current VPN service log is located. To display the log path:
$ sudo serveradmin command vpn:command = getLogPaths
Output
vpn:vpnLog = <vpn-log>
Value <vpn-log>
149
IP Failover
IP failover allows a secondary server to acquire the IP address of a primary server if the primary server ceases to function. Once the primary server returns to normal operation, the secondary server relinquishes the IP address. This allows your website to remain available on the network even if the primary server is temporarily offline. Note: IP failover only allows a secondary server to acquire a primary servers IP address. You need additional software tools such as rsync to provide capabilities such as mirroring the primary servers data on the secondary server. See the rsync man pages for more information.
Requirements
IP failover isnt a complete solution; it is one tool you can use to increase your servers availability to your clients. To use IP failover, you will need to set up the following hardware and software. Hardware IP failover requires the following hardware setup: Primary server Secondary server Public network (servers must be on same subnet) Private network between the servers (additional network interface card) Note: Because IP failover uses broadcast messages, both servers must have IP addresses on the same subnet of the public network. In addition, both servers must have IP addresses on the same subnet of the private network. Software IP failover requires the following software setup: Unique IP addresses for each network interface (public and private) Software to mirror primary server data to secondary server Scripts to control failover behavior on secondary server (optional)
Failover Operation
When IP failover is active, the primary server periodically broadcasts a brief message confirming normal operation on both the public and private networks. This message is monitored by the secondary server. If the broadcast is interrupted on both public and private networks, the secondary server initiates the failover process. If status messages are interrupted on only one network, the secondary server sends email notification of a network anomaly, but doesnt acquire the primary servers IP address. Email notification is sent when the secondary server detects a failover condition, a network anomaly, and when the IP address is relinquished back to the primary server.
150
Enabling IP Failover
You enable IP failover by adding command lines to the file /etc/hostconfig on the primary and the secondary server. Be sure to enter these lines exactly as shown with regard to spaces and punctuation marks. To enable IP failover: 1 At the primary server, add the following line to /etc/hostconfig:
FAILOVER_BCAST_IPS="10.0.0.255 100.0.255.255"
Substitute the broadcast addresses used on your server for the public and private networks. This tells the server to send broadcast messages over relevant network interfaces that the server at those IP addresses is functioning. 2 Restart the primary server so that your changes can take effect. 3 Disconnect the primary server from both the public and private networks. 4 At the secondary server, add the following lines to /etc/hostconfig:
FAILOVER_PEER_IP="10.0.0.1" FAILOVER_PEER_IP_PAIRS="en0:100.0.0.10" FAILOVER_EMAIL_RECIPIENT="admin@example.com"
In the first line substitute the IP address of the primary server on the private network. In the second line enter the local network interface that should adopt the primary servers public IP address, a colon, then the primary servers public IP address. (Optional) In the third line, enter the email address for notification messages regarding the primary server status. If this line is omitted, email notifications are sent to the root account on the local machine. 5 Restart the secondary server so your changes can take effect and allow the secondary server to acquire the primarys public IP address. Important: Before you enable IP Failover, verify on both servers that the port used for the public network is at the top of the Network Port Configurations list in the Network pane of System Preferences. Also verify that the port used for the private network contains no DNS configuration information. 6 Reconnect the primary server to the private network, wait fifteen seconds, then reconnect the primary server to the public network. 7 Verify that the secondary server relinquishes the primary servers public IP address.
151
Configuring IP Failover
You configure failover behavior using scripts. The scripts must be executable (for example, shell scripts, Perl, compiled C code, or executable AppleScripts). You place these scripts in /Library/IPFailover/<IP address> on the secondary server. You need to create a directory named with the public IP address of the primary server to contain the failover scripts for that server. For example:
/Library/IPFailover/100.0.0.10
Notification Only You can use a script named Test located in the failover scripts directory to control whether, in the event of a failover condition, the secondary server acquires the primarys IP address, or simply sends an email notification. If no script exists, or if the script returns a zero result, then the secondary server acquires the primarys IP address. If the script returns a non-zero result, then the secondary server skips IP address acquisition and only sends email notification of the failover condition. The test script is run to determine whether the IP address should be acquired and to determine if the IP address should be relinquished when the primary server returns to service. A simple way to set up this notification-only mode is to copy the script located at /usr/bin/false to the directory named with your primary server IP address and then change the name of the script to Test This script always returns a non-zero result. . Using the Test script, you can configure the primary server to monitor the secondary server, and send email notification if the secondary server becomes unavailable. Pre and Post Scripts You can configure the failover process with scripts that can run before acquiring the primary IP address (preacquisition), after acquiring the IP address (postacquisition), before relinquishing the primary IP address (prerelinquish), and after relinquishing the IP address back to the primary server (postrelinquish). These scripts reside in the /Library/IPFailover/<IP address> directory on the secondary server, as previously discussed. The scripts use these four prefixes: PreAcq run before acquiring IP address from primary server PostAcq run after acquiring IP address from primary server PreRel run before relinquishing IP address back to primary server PostRel run after relinquishing IP address back to primary server Important: Always be sure that the primary server is up and functioning normally before you activate IP failover on the secondary server. If the primary server isnt sending broadcast messages, the secondary server will initiate the failover process and acquire the primarys public IP address. You may have more than one script at each stage. The scripts in each prefix group are run in the order their file names appear in a directory listing using the ls command.
152
For example, your secondary server may perform other services on the network such as running a statistical analysis application and distributed image processing software. A preacquisition script quits the running applications to free up the CPU for the Web server. A postacquisition script starts the Web server. Once the primary is up and running again, a prerelinquish script quits the Web server, and a postrelinquish script starts the image processing and statistical analysis applications. The sequence of scripted events might look like this:
<Failover condition detected> Test (if present) PreAcq10.StopDIP PreAcq20.StopSA PreAcq30.CleanupTmp <Acquire IP address> PostAcq10.StartTimer PostAcq20.StartApache <Primary server returns to service> PreRel10.StopApache PreRel20.StopTimer <Relinquish IP address> PostRel10.StartSA PostRel20.StartDIP PostRel30.MailTimerResultsToAdmin
153
14
14
Commands you can use to manage the Open Directory service in Mac OS X Server.
This chapter includes descriptions of general directory tools and tools for working with LDAP, NetInfo, and the Password Server.
155
NetInfoRunStatus
LDAPSSLCertificatePath Default = "" masterServer LDAPServerType NetInfoDomain replicationWhen useSSL LDAPDefaultPrefix LDAPTimeoutUnits LDAPServerBackend Default = "" Default = "standalone" Default = "" Default = "periodic" Default = "YES" Default = "dc=<domain>,dc=com" Default = "minutes" Default = "BerkeleyDB"
156
LDAP
Configuring LDAP
The following tools are available for configuring LDAP. For more information, see the man page for each tool. slapconfig You can use the slapconfig utility to configure the slapd and slurpd LDAP daemons and related search policies. For more information, type man slapconfig to see the man page. Standard Distribution Tools These tools are included in the standard LDAP distribution.
Program /usr/bin/ldapadd /usr/bin/ldapcompare /usr/bin/ldapdelete /usr/bin/ldapmodify /usr/bin/ldapmodrdn /usr/bin/ldappasswd Used to Add entries to the LDAP directory. Compare a directory entrys actual attributes with known attributes. Delete entries from the LDAP directory. Change an entrys attributes. Change an entrys relative distinguished name (RDN). Set the password for an LDAP user. Apple recommends using passwd instead of ldappasswd. For more information, type man passwd. Search the LDAP directory. See the usage note under A Note on Using ldapsearch on this page. Obtain the primary authorization identity associated with a user. Add entries to the LDAP directory. Export LDAP Directory Interchange Format files. Regenerate directory indexes. Generate user password. hashes.
To avoid this, include the -x option when you type the command. For example:
ldapsearch -h 192.168.100.1 -b "dc=ecxample,dc=com" -x
157
You should find this parameter in the plist file near <key>OpenClose Timeout in
seconds<\key>. If not, you can add it there.
Idle Timeout This parameter specifies how long the LDAP plugin will sit idle before disconnecting from the server. You can adjust this value to reduce overloading of the server's connections from remote clients.
<key>Idle Timeout in minutes<\key> <integer>n<\integer>
If it doesnt already exist in the plist file, you can add it near <key>OpenClose Timeout
in seconds<\key>.
158
NetInfo
Configuring NetInfo
You can use the following command-line utilities to manage the NetInfo directory. For more information about a utility, see the related man page.
Utility NeST nicl nifind nigrep nidump niload nireport Used to Configure the directory system of a server. Create, view, and modify entries in the NetInfo directory. Search the NetInfo directory for a particular entry. Search the NetInfo directory for an expression. Export NetInfo data to text or flat files. Import flat files into the NetInfo directory. Print tables of NetInfo directory entries.
For example, you can use the NeST -setprotocols command to specify which authentication methods the servers Open Directory Password Server uses.
Password Server
Working With the Password Server
You can use the mkpassdb utility to create, modify, or back up the password database used by the Mac OS X Server Password Server. For more information, type man mkpassdb to read the man page.
Parameter protocol
Description Any of the protocol names listed by NeST -getprotocols (for example, SMB-LAN-MANAGER).
159
For information on the available methods, see the Open Directory administration guide.
160
15
15
Commands you can use to manage QTSS service in Mac OS X Server. Starting QTSS Service
You can use the serveradmin command to start QTSS service, or you can use the quicktimestreamingserver command to specify additional service parameters when you start the service. To start QTSS service:
$ sudo serveradmin start qtss
or
$ sudo quicktimestreamingserver
161
To list a group of settings: You can list a group of settings that have part of their names in common by typing only as much of the name as you want, stopping at a colon (:), and typing an asterisk (*) as a wildcard for the remaining parts of the name. For example,
$ sudo serveradmin settings qtss:modules:_array_id:QTSSAdminModule:*
Parameter setting
Description A QTSS service setting. To see a list of available settings, type $ sudo serveradmin settings qtss or see QTSS Settings on page 163. An appropriate value for the setting.
value
162
QTSS Settings
Use the following parameters with the serveradmin command to change settings for the QTSS service. Descriptions of Settings To see descriptions of most QTSS settings, you can look in the sample settings file /Library/QuickTimeStreaming/Config/streamingserver.xml-sample. Look for XML module and pref names that match the last two segments of the parameter name. For example, to see a description of
modules:_array_id:QTSSFileModule:record_movie_file_sdp
163
Parameter (qtss:) modules:_array_id:QTSSAdminModule: AdministratorGroup modules:_array_id:QTSSAdminModule: Authenticate modules:_array_id:QTSSAdminModule: enable_remote_admin modules:_array_id:QTSSAdminModule: IPAccessList modules:_array_id:QTSSAdminModule: LocalAccessOnly modules:_array_id:QTSSFileModule: add_seconds_to_client_buffer_delay modules:_array_id:QTSSFileModule: admin_email modules:_array_id:QTSSFileModule: record_movie_file_sdp modules:_array_id:QTSSHomeDirectoryModule: enabled modules:_array_id:QTSSHomeDirectoryModule: movies_directory modules:_array_id:QTSSMP3StreamingModule: mp3_broadcast_buffer_size modules:_array_id:QTSSMP3StreamingModule: mp3_broadcast_password modules:_array_id:QTSSMP3StreamingModule: mp3_max_flow_control_time modules:_array_id:QTSSMP3StreamingModule: mp3_request_logfile_dir modules:_array_id:QTSSMP3StreamingModule: mp3_request_logfile_interval modules:_array_id:QTSSMP3StreamingModule: mp3_request_logfile_name modules:_array_id:QTSSMP3StreamingModule: mp3_request_logfile_size modules:_array_id:QTSSMP3StreamingModule: mp3_request_logging modules:_array_id:QTSSMP3StreamingModule: mp3_request_logtime_in_gmt modules:_array_id:QTSSMP3StreamingModule: mp3_streaming_enabled
Description Default = "admin" Default = yes Default = yes Default = "127.0.0.*" Default = yes Default = 0 Default = "" Default = no Default = no Default = "/Sites/Streaming" Default = 8192 Default = "" Default = 10000 Default = "/Library/QuickTime Streaming/Logs/" Default = 7 Default = "mp3_access" Default = 10240000 Default = yes Default = yes Default = yes
164
Parameter (qtss:) modules:_array_id:QTSSReflectorModule: allow_broadcasts modules:_array_id:QTSSReflectorModule: allow_non_sdp_urls modules:_array_id:QTSSReflectorModule: BroadcasterGroup modules:_array_id:QTSSReflectorModule: broadcast_dir_list modules:_array_id:QTSSReflectorModule: disable_overbuffering modules:_array_id:QTSSReflectorModule: enable_broadcast_announce modules:_array_id:QTSSReflectorModule: enable_broadcast_push modules:_array_id:QTSSReflectorModule: ip_allow_list modules:_array_id:QTSSReflectorModule: kill_clients_when_broadcast_stops modules:_array_id:QTSSReflectorModule: minimum_static_sdp_port modules:_array_id:QTSSReflectorModule: timeout_broadcaster_session_secs modules:_array_id:QTSSRelayModule: relay_prefs_file server:authentication_scheme server:auto_restart server:default_authorization_realm server:do_report_http_connection_ip_address server:error_logfile_dir server:error_logfile_name server:error_logfile_size server:error_logfile_verbosity server:error_logging server:force_logs_close_on_write server:maximum_bandwidth server:maximum_connections server:module_folder
Description Default = yes Default = yes Default = "broadcaster" Default = "" Default = no Default = yes Default = yes Default = "127.0.0.*" Default = no Default = 20000 Default = 20 Default = "/Library/Quick TimeStreaming/Config/ relayconfig.xml" Default = "digest" Default = yes Default = "Streaming Server" Default = no Default = "/Library/Quick TimeStreaming/Logs/" Default = "Error" Default = 256000 Default = 2 Default = yes Default = no Default = 102400 Default = 1000 Default = "/Library/Quick TimeStreaming/Modules/"
165
Parameter (qtss:) server:movie_folder server:pid_file server:reliable_udp server:reliable_udp_dirs server:run_group_name server:run_num_threads server:run_user_name web_admin:enabled web_admin:password web_admin:username
Description Default = "/Library/Quick TimeStreaming/Movies/" Default = "/var/run/Quick TimeStreamingServer.pid" Default = yes Default = "/" Default = "qtss" Default = 0 Default = "qtss" Default = no Default = "" Default = ""
166
Parameter statistic
Description The value you want to display. Valid values: v1 - number of connected users (average during sampling period) v2 - throughput (bytes/sec) The length of time in seconds, ending with the current time, for which you want to see samples. For example, to see 30 minutes of data, you would specify qtss:timeScale = 1800.
scale
Output
qtss:nbSamples = <samples> qtss:samplesArray:_array_index:0:vn = <sample> qtss:samplesArray:_array_index:0:t = <time> qtss:samplesArray:_array_index:1:vn = <sample> qtss:samplesArray:_array_index:1:t = <time> [...] qtss:samplesArray:_array_index:i:vn = <sample> qtss:samplesArray:_array_index:i:t = <time> qtss:vnLegend = "<legend>" qtss:currentServerTime = <servertime>
Description The total number of samples listed. A textual description of the selected statistic. "CONNECTIONS" for v1 "THROUGHPUT" for v2 The numerical value of the sample. For connections (v1), this is integer average number of connections. For throughput, (v2), this is integer bytes per second. The time at which the sample was measured. A standard UNIX time (number of seconds since Sep 1, 1970). Samples are taken every 60 seconds.
<sample>
<time>
167
You can use the serveradmin getLogPaths command to see where the current QTSS error and activity logs are located. To display the log paths:
$ sudo serveradmin command qtss:command = getLogPaths
Output
qtss:accessLog = <access-log> qtss:errorLog = <error-log>
Value <access-log>
Description The location of the QTSS service access log. Default = /Library/QuickTimeStreaming/Logs/ StreamingServer.log The location of the QTSS service error log. Default = /Library/QuickTimeStreaming/Logs/ Error.log
<error-log>
2 Find the larger of the two process IDs (PIDs) for the QuickTimeStreamingServer processes (in this case 950). 3 Send a HUP signal to this process:
$ kill -HUP 950
168
Parameter user
Description The user in whose home directory the /Sites/Streaming folder is created.
169
A
AFP (Apple Filing Protocol) canceling user disconnect 74 changing service settings 68 checking service status 67 disconnecting users 73 listing connected users 72 sending user message 73 service settings 68 starting service 67 stopping service 67 viewing service logs 76 viewing service settings 67 viewing service statistics 75 AirPort settings 44 Apache web server 124 Apple Filing Protocol. See AFP AppleTalk settings 42
D
date 31, 32 delay rebinding options, LDAP 158 DHCP (Dynamic Host Configuration Protocol) adding a subnet 133 changing service settings 130 checking service status 129 service settings 130 set server to use 40 starting service 129 stopping service 129 viewing service logs 134 viewing service settings 129 dial-in service, PPP 153 DirectoryServiceAttributes 155 DirectoryServiceAttributes 155 DirectoryService daemon 155 DirectoryService daemon 155 disk journaling 50 diskspacemonitor command 48 DNS (Domain Name System) changing servers 41 changing service settings 135 checking service status 135 service settings 135 starting service 135 stopping service 135 viewing service logs 135 viewing service settings 135 viewing service statistics 136 Domain Name System. See DNS dscl command 155 dsimportexport command 5457 dsperfmonitor command 155 Dynamic Host Configuration Protocol. See DHCP
B
bless command 30 BootP set server to use 40
C
case-sensitive file system 51 certificate file 119121 certificates, purchasing 121 certtool utility 119, 121 changeip tool 39 command editing shortcuts 14 command not found message 14 command prompt 13 computer name 31, 44 configuration file, server example 22 naming 25 saving 21 connections AFP 72 FTP 80 QTSS 166
E
energy saver settings 33 error messages command not found 14
Index
171
Index
F
file system, case-sensitive 51 File Transfer Protocol. See FTP fingerprint, RSA 17 Firewall service. See IPFilter service fsck command 50 FTP (File Transfer Protocol) changing service settings 78 checking connections 80 checking service status 77 service settings 78 starting service 77 stopping service 77 viewing service logs 80 viewing service settings 77 FTP proxy settings 42
L
LDAP (Lightweight Directory Access Protocol) and SASL 157 configuration file 158 delay rebinding options 158 idle timeout parameter 158 ldapsearch tool 157 parameter list 158 rebinding parameter 158 tools and utilities 157 tools for configuring 157 ldapadd tool 157 ldapcompare tool 157 ldapdelete tool 157 ldapmodify tool 157 ldapmodrdn tool 157 ldappasswd tool 157 ldapsearch tool 157 ldapwhoami tool 157 Lightweight Directory Access Protocol. See LDAP log files AFP service 76 DHCP service 134 DNS service 135 FTP service 80 IPFilter service 142 Mail service 118 NAT service 144 Print service 95 QTSS 168 reclaiming space 49 SMB service 87 VPN service 149 Web service 125 login, enabling remote 35
G
Gopher proxy settings 43
H
home directory, creating 63 host name 45 hup signal 168
I
installer command 21 IP address changing servers address 39 validating 40 IP Failover 150153 IPFilter service changing settings 137 checking status 137 configuration file 138 defining rules 138 settings 137 starting 136 stopping 136 viewing logs 142 viewing settings 137 ipfw.conf file 138
M
MAC address 37 Mail service changing settings 104 checking status 103 settings 104 starting 103 stopping 103 viewing logs 118 viewing settings 103 viewing statistics 117 man command 18 man pages, viewing 18 mkpassdb utility 159 mount command 47
J
journaling 50
K
kdcsetup utility 160 Kerberos tools and utilities 160 kerberosautoconfig tool 160 keychain 119 kill command 168 known_hosts file 17
N
NAT (Network Address Translation) changing service settings 143
172
Index
checking service status 142 service settings 143 starting service 142 stopping service 142 viewing service logs 144 viewing service settings 142 NeST tool 159 NetBoot service changing settings 98 checking status 97 filters record array 99 general settings 98 image record array 100 port record array 101 starting 97 stopping 97 storage record array 99 viewing settings 97 NetInfo tools and utilities 159 Network Address Translation. See NAT Network File System. See NFS network interface, settings 37 network port, settings 37 network port configurations 38 network time server 31, 33 NFS (Network File System) changing service settings 77 checking service status 76 starting and stopping service 76 viewing service settings 76 nicl tool 159 nidump tool 159 nifind tool 159 nigrep tool 159 niload tool 159 nireport tool 159
automatic restart 33 power management 34 PPP (Point-to-Point Protocol) enabling dial-in service 153 pppd command 153 pppd command 153 Print service changing settings 90 checking status 89 holding jobs 94 listing jobs 94 listing queues 93 pausing queues 93 queue data array 91 settings 90 starting 89 stopping 89 viewing logs 95 viewing settings 89 prompt 13 proxy settings FTP 42 Gopher 43 SOCKS firewall 44 streaming 43 web 43 ps command listing QTSS processes 168
Q
QTSS (QuickTime Streaming Server) changing settings 162 checking status 161 commands for managing 161 listing connections 166 logs 168 settings 163 starting 161 statistics 167 stopping 161 viewing settings 162 QuickTime Streaming Server. See QTSS
O
Open Directory data types 155 LDAP 157 modifying a node 155 NetInfo 159 settings 156 SLP 156 testing configuration 155 testing plugins 155
R
rebinding options, LDAP 158 remote login, enabling 35 Rendezvous name 45 restart automatic 33 checking if required 19 server 29 root privileges su command 15 sudo command 15 RSA fingerprint 17
P
password server 159 plugins, Open Directory 155 pmset command 34 Point-to-Point Protocol. See PPP power failure
Index
173
S
SASL used by ldapsearch 157 scripts adding a website 127 Secure Sockets Layer. See SSL serial number, server software 26 serveradmin utility usage notes 19 server configuration file example 22 naming 25 saving 21 Server Message Block. See SMB serversetup utility usage notes 19 Service Location Protocol. See SLP share points creating 66 listing 65 updating SMB service after change 86 sharing command 65, 66 shell prompt 13 shortcuts typing commands 14 shutdown command 30 restarting a server 29 single sign-on 160 slapadd tool 157 slapcat tool 157 slapconfig utility 157 slapindex tool 157 slappasswd tool 157 sleep settings 33 SLP (Service Location Protocol) registering URLs 156 slp_reg command 156 SMB (Server Message Block) changing service settings 81 checking service status 80 disconnecting users 85 listing service users 84 service settings 82 starting service 80 stopping service 80 viewing service logs 87 viewing service settings 81 viewing service statistics 86 SOCKS firewall proxy settings 44 softwareupdate command 26 ssh command 16 SSL 17 SSL (secure Sockets Layer) using with Mail service 119 SSLOptions 17
SSLRequire 17 sso_util utility 160 startup disk 34 statistics AFP 75 DNS 136 Mail service 117 QTSS 167 SMB 86 Web service 126 streaming proxy settings 43 subnet mask validating 40 su command 15 sudo command 15
T
tail command viewing AFP service logs 76 viewing DHCP service logs 134 viewing DNS service logs 135 viewing FTP service logs 80 viewing IPFilter service logs 142 viewing Mail service logs 118 viewing NAT service logs 144 viewing Print service logs 95 viewing QTSS service logs 168 viewing SMB service logs 87 viewing VPN service logs 149 viewing Web service logs 125 TCP/IP settings 39, 40 Telnet 18 Terminal using 13 throughput. See statistics time 31, 32 time server 31, 33 time zone 31, 32
U
users attributes 57 checking admin privileges 63 checking name, id, or password 62 creating administrators 53 creating home directory 63 importing 5457
V
Virtual Private Network. See VPN volumes, mounting and unmounting 47 VPN (Virtual Private Network) changing service settings 145 checking service status 145 service settings 146
174
Index
starting service 145 stopping service 145 viewing service logs 149 viewing service settings 145
W
web proxy settings 43 Web service changing settings 124 checking status 123
listing sites 125 script to add site 127 starting 123 stopping 123 viewing logs 125 viewing settings 123 viewing statistics 126 websites script for adding 127 Windows service. See SMB service
Index
175