Mac OS X Server,  Mass Deployment

Add Services to Server Admin From the Command Line

In the Server Admin application, you need to enable any services before you can actually start them. In order to do so to a lot of servers at once, you want to automate that. Such automation can be done using the serveradmin command line options. The settings would be sent to info. To see all of the settings available there:

serveradmin settings info

Note that there’s a whole section for info:serviceConfig:

info:serviceConfig:roles:com.apple.SimpleServerSetup.ODPlugin:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.DirectoryServices:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.NetBoot:configured = no
info:serviceConfig:services:com.apple.ServerAdmin.AddressBook:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.SWUpdate:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.NAT:configured = no
info:serviceConfig:services:com.apple.ServerAdmin.Mail:configured = no
info:serviceConfig:services:com.apple.ServerAdmin.Notification:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.VPN:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.DHCP:configured = no
info:serviceConfig:services:com.apple.ServerAdmin.Calendar:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.AppleFile:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.Jabber:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.Radius:configured = no
info:serviceConfig:services:com.apple.ServerAdmin.IPFirewall:configured = no
info:serviceConfig:services:com.apple.ServerAdmin.Podcast:configured = no
info:serviceConfig:services:com.apple.ServerAdmin.Windows:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.DNS:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.NFS:configured = yes
info:serviceConfig:services:com.apple.ServerAdmin.Xgrid:configured = no
info:serviceConfig:services:com.apple.ServerAdmin.Web:configured = yes

Toggling these will cause the corresponding service to appear in Server Admin. So to enable the VPN service to show in Server Admin:

serveradmin settings info:serviceConfig:services:com.apple.ServerAdmin.VPN:configured=yes

The server name is also set in info at configuration time and while the wizard changes the name in some places, it doesn’t change the name that appears on client systems for Profile Manager Management Profiles. info:ComputerName is the name that was given to the server when Server.app was installed, which doesn’t necessarily match the output of scutil –get ComputerName or HostName. Anyway, overall, there are a few interesting settings in here and when I’m looking for something I rarely think to look here first. A tip of the hat to Allan Sanderson (@allansan) for pointing this out on the ‘ole Twitter.