diff -r 5d11924157d3 ipa-server/ipa-install/ipa-server-install
--- a/ipa-server/ipa-install/ipa-server-install	Fri Jan 25 10:12:22 2008 +0000
+++ b/ipa-server/ipa-install/ipa-server-install	Fri Jan 25 10:25:56 2008 +0000
@@ -305,11 +305,11 @@ def main():
         admin_password = options.admin_password
 
     # Create a directory server instance
-    ds.create_realm(realm_name)
+    ds.create_realm(realm_name, dm_password, host_name, ds_user)
 
     # Create a kerberos instance
     krb = ipaserver.krbinstance.KrbInstance()
-    krb.create_realm(ds_user, realm_name, host_name, dm_password, master_password)
+    krb.create_realm(realm_name, dm_password, host_name, ds_user, master_password)
 
     # Create a HTTP instance
     http.create_realm(realm_name, host_name)
diff -r 5d11924157d3 ipa-server/ipaserver/dsinstance.py
--- a/ipa-server/ipaserver/dsinstance.py	Fri Jan 25 10:12:22 2008 +0000
+++ b/ipa-server/ipaserver/dsinstance.py	Fri Jan 25 10:25:56 2008 +0000
@@ -101,13 +101,17 @@ class DsInstance(service.Service):
         self.domain = None
         self.pkcs12_info = None
 
+    def __set_host_name(self, host_name):
+        self.host_name = host_name
+        self.domain = host_name[host_name.find(".")+1:]
+
     def install(self, ds_user, host_name, dm_password, pkcs12_info=None):
         self.ds_user = ds_user
-        self.host_name = host_name
         self.dm_password = dm_password
-        self.domain = host_name[host_name.find(".")+1:]
         self.pkcs12_info = pkcs12_info
         self.suffix = "dc=IPA"
+
+        self.__set_host_name(host_name)
         
         self.step("creating directory server user", self.__create_ds_user)
         self.step("creating directory server instance", self.__create_instance)
@@ -125,9 +129,18 @@ class DsInstance(service.Service):
 
         self.start_creation("Configuring directory server:")
 
-    def create_realm(self, realm_name):
+    def create_realm(self, realm_name, dm_password, host_name = None, ds_user = None):
         self.realm_name = realm_name.upper()
         self.suffix = realm_to_suffix(self.realm_name)
+        self.dm_password = dm_password
+
+        if not host_name:
+            host_name = installutils.get_fqdn()
+        self.__set_host_name(host_name)
+        
+        if not ds_user:
+            ds_user = pwd.getpwuid(os.stat(CONFIG_DIRNAME).st_uid).pw_name
+        self.ds_user = ds_user
 
         self.step("creating " + self.realm_name + " suffix", self.__create_suffix)
         self.step("adding default layout", self.__add_default_layout)
diff -r 5d11924157d3 ipa-server/ipaserver/httpinstance.py
--- a/ipa-server/ipaserver/httpinstance.py	Fri Jan 25 10:12:22 2008 +0000
+++ b/ipa-server/ipaserver/httpinstance.py	Fri Jan 25 10:25:56 2008 +0000
@@ -70,9 +70,12 @@ class HTTPInstance(service.Service):
 
         self.start_creation("Configuring the web interface")
 
-    def create_realm(self, realm, fqdn):
+    def create_realm(self, realm, fqdn = None):
+        self.realm = realm
+
+        if not fqdn:
+            fqdn = installutils.get_fqdn()
         self.fqdn = fqdn
-        self.realm = realm
         self.domain = fqdn[fqdn.find(".")+1:]
         
         self.step("creating a keytab for httpd", self.__create_http_keytab)
diff -r 5d11924157d3 ipa-server/ipaserver/krbinstance.py
--- a/ipa-server/ipaserver/krbinstance.py	Fri Jan 25 10:12:22 2008 +0000
+++ b/ipa-server/ipaserver/krbinstance.py	Fri Jan 25 10:25:56 2008 +0000
@@ -33,6 +33,7 @@ import service
 import service
 import sysrestore
 import installutils
+import dsinstance
 from ipa import ipautil
 from ipa import ipaerror
 
@@ -121,7 +122,15 @@ class KrbInstance(service.Service):
         self.step("starting the KDC", self.__start_instance)
         self.step("configuring KDC to start on boot", self.__enable)
 
-    def create_realm(self, ds_user, realm_name, host_name, admin_password, master_password):
+    def create_realm(self, realm_name, admin_password, host_name = None, ds_user = None, master_password = None):
+        if not host_name:
+            host_name = installutils.get_fqdn()
+
+        if not ds_user:
+            ds_user = pwd.getpwuid(os.stat(dsinstance.CONFIG_DIRNAME).st_uid).pw_name
+
+        if not master_password:
+            master_password = ipautil.ipa_generate_password()
         self.master_password = master_password
 
         self.__common_setup(ds_user, realm_name, host_name, admin_password)
