Requesting that Server.app's command line setup work without interactive input

Originator:rtrouton
Number:rdar://23308486 Date Originated:28-Oct-2015 10:04 PM
Status:Closed Resolved:
Product:OS X Server Product Version:5.0.3
Classification:Enhancement Reproducible:Not Applicable
 
Summary:

In Server.app 5.0.3, there's an undocumented feature that allows Server's initial setup to be performed entirely from the command line. The procedure is interactive and requires keyboard input to agree to the Server license as well as entering an administrator's username and password.

Enhancement Request:

I would like a command-line switch that allows for a silent install when the 'setup' command is run with root privileges. The silent install would include automatic agreement to the license agreement and admin authorization.

Steps to Reproduce:

1. Install Server.app 5.0.3
2. Open Terminal
3. Enter the following command:

sudo server setup

4. The following output appears:

computername:~ administrator$ sudo server setup
Password:
To use server, you must agree to the terms of the software license agreement.

Press Return to view the software license agreement.

5. On pressing the Return key, the license agreement appears:

---insert license agreement here---

6. Agreement to the license agreement is requested:

Do you agree to the terms of the software license agreement? (y/N) y

7. Administrator authorization is requested:

Administrator access is required to set up OS X Server on this Mac. Type an administrator's user name and password to allow this.
User name: administrator
Password: 

8. The following output appears:

--------

Initializing setup...
Getting server state...
Getting host names...
Writing server settings...
Configuring Service Authentication...
Creating certificates...
Getting certificates...
Renewing certificate...
Enabling server password hashes for local users...
Creating service principals...
Initializing certificates...
Preparing services...
Preparing Caching service...
Preparing Calendar service...
Preparing Profile Manager service...
Preparing File Sharing service...
Preparing Software Update service...
Preparing Messages service...
Preparing Mail service...
Preparing Web service...
Preparing Calendar service...
Preparing Wiki service...
Preparing Calendar service...
Preparing Profile Manager service...
Initializing Wiki...
Initializing Mail...
Initializing VPN...
Initializing Xcode...
Enabling autobuddy for local accounts...
Updating admin password policy...
Checking DNS Configuration...
Reading DNS configuration...
Completing setup...

server encountered errors during setup:

Unknown error
computername:~ administrator$

--------

Notes:

Blog entry about the command line setup for Server.app: http://krypted.com/mac-os-x-server/automating-the-server-app-setup-using-a-script/

Automated setup script, which includes using an expect script to agree the license agreement and provide admin authorization:

https://gist.github.com/rtrouton/c09f8ed541d330c4c7d4

Comments

Response from Apple Developer Relations

There are no plans to address this.

We are now closing this report.

If you have questions about the resolution, or if this is still a critical issue for you, then please update your bug report with that information.

Please be sure to regularly check new Apple releases for any updates that might affect this issue.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!