diff -r 4186ae84839c ipa-server/ipa-gui/ipagui/controllers.py
--- a/ipa-server/ipa-gui/ipagui/controllers.py	Fri Jan 25 16:11:43 2008 +0000
+++ b/ipa-server/ipa-gui/ipagui/controllers.py	Fri Jan 25 17:02:59 2008 +0000
@@ -20,6 +20,7 @@ from subcontrollers.policy import Policy
 from subcontrollers.policy import PolicyController
 from subcontrollers.ipapolicy import IPAPolicyController
 from subcontrollers.principal import PrincipalController
+from subcontrollers.firstboot import FirstBootController
 
 ipa.config.init_config()
 
@@ -33,6 +34,7 @@ class Root(controllers.RootController):
     policy = PolicyController()
     ipapolicy = IPAPolicyController()
     principal = PrincipalController()
+    firstboot = FirstBootController()
 
     @expose(template="ipagui.templates.welcome")
     @identity.require(identity.not_anonymous())
diff -r 4186ae84839c ipa-server/ipa-gui/ipagui/forms/Makefile.am
--- a/ipa-server/ipa-gui/ipagui/forms/Makefile.am	Fri Jan 25 16:11:43 2008 +0000
+++ b/ipa-server/ipa-gui/ipagui/forms/Makefile.am	Fri Jan 25 17:02:59 2008 +0000
@@ -3,6 +3,7 @@ appdir = $(IPA_DATA_DIR)/ipagui/forms
 appdir = $(IPA_DATA_DIR)/ipagui/forms
 app_PYTHON = 			\
 	__init__.py		\
+	firstboot.py		\
 	group.py		\
 	ipapolicy.py		\
 	user.py			\
diff -r 4186ae84839c ipa-server/ipa-gui/ipagui/forms/firstboot.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipa-server/ipa-gui/ipagui/forms/firstboot.py	Fri Jan 25 17:02:59 2008 +0000
@@ -0,0 +1,14 @@
+from turbogears import widgets
+
+class FirstBootForm(widgets.Form):
+    params = [ "hostname", "ip", "realm", "passwd" ]
+
+    def __init__(self, *args, **kw):
+        super(FirstBootForm, self).__init__(*args, **kw)
+
+        (self.template_c, self.template) = widgets.meta.load_kid_template("ipagui.templates.firstbootform")
+
+        self.hostname = widgets.TextField(name = "hostname", label = "Host Name")
+        self.ip = widgets.TextField(name = "ip", label = "IP Address")
+        self.realm = widgets.TextField(name = "realm", label = "Realm")
+        self.passwd = widgets.TextField(name = "passwd", label = "Administrator Password")
diff -r 4186ae84839c ipa-server/ipa-gui/ipagui/subcontrollers/Makefile.am
--- a/ipa-server/ipa-gui/ipagui/subcontrollers/Makefile.am	Fri Jan 25 16:11:43 2008 +0000
+++ b/ipa-server/ipa-gui/ipagui/subcontrollers/Makefile.am	Fri Jan 25 17:02:59 2008 +0000
@@ -3,6 +3,7 @@ appdir = $(IPA_DATA_DIR)/ipagui/subcontr
 appdir = $(IPA_DATA_DIR)/ipagui/subcontrollers
 app_PYTHON = 			\
 	__init__.py		\
+	firstboot.py		\
 	group.py		\
 	ipacontroller.py	\
 	ipapolicy.py		\
diff -r 4186ae84839c ipa-server/ipa-gui/ipagui/subcontrollers/firstboot.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipa-server/ipa-gui/ipagui/subcontrollers/firstboot.py	Fri Jan 25 17:02:59 2008 +0000
@@ -0,0 +1,38 @@
+import ldap
+import turbogears
+
+import ipacontroller
+import ipagui.forms.firstboot
+
+import ipa.ipaerror
+
+firstboot_form = ipagui.forms.firstboot.FirstBootForm()
+
+class FirstBootController(ipacontroller.IPAController):
+    @turbogears.expose("ipagui.templates.firstboot")
+    def index(self):
+        return dict(form = firstboot_form)
+
+    @turbogears.expose()
+    def create(self, **kw):
+        self.restrict_post()
+
+        dm_password = file("/var/cache/ipa/dm-passwd", "r").read().strip()
+
+        try:
+            conn = ldap.initialize("ldap://localhost")
+            conn.bind_s("cn=Directory Manager", dm_password, ldap.AUTH_SIMPLE)
+        except ldap.LDAPError, e:
+            turbogears.flash("Failed to connect to the Directory Server: %s" % e)
+            raise turbogears.redirect("/firstboot")
+
+        conn.modify_s("cn=config,dc=IPA",
+                      [(ldap.MOD_REPLACE, "ipaRealmName", [str(kw.get("realm"))])])
+        conn.modify_s("cn=config,dc=IPA",
+                      [(ldap.MOD_REPLACE, "ipaHostName", [str(kw.get("hostname"))])])
+        conn.modify_s("cn=config,dc=IPA",
+                      [(ldap.MOD_REPLACE, "ipaIpAddress", [str(kw.get("ip"))])])
+        conn.modify_s("cn=config,dc=IPA",
+                      [(ldap.MOD_REPLACE, "ipaAdminPassword", [str(kw.get("adminpasswd"))])])
+
+        raise turbogears.redirect("/")
diff -r 4186ae84839c ipa-server/ipa-gui/ipagui/templates/Makefile.am
--- a/ipa-server/ipa-gui/ipagui/templates/Makefile.am	Fri Jan 25 16:11:43 2008 +0000
+++ b/ipa-server/ipa-gui/ipagui/templates/Makefile.am	Fri Jan 25 17:02:59 2008 +0000
@@ -13,6 +13,8 @@ app_DATA =			\
 	delegatelist.kid	\
 	delegatenew.kid		\
 	dynamiceditsearch.kid	\
+	firstbootform.kid	\
+	firstboot.kid		\
 	groupeditform.kid	\
 	groupedit.kid		\
 	grouplayout.kid		\
diff -r 4186ae84839c ipa-server/ipa-gui/ipagui/templates/firstboot.kid
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipa-server/ipa-gui/ipagui/templates/firstboot.kid	Fri Jan 25 17:02:59 2008 +0000
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?python import sitetemplate ?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="sitetemplate">
+
+<head>
+    <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
+    <title>Welcome</title>
+    <style type="text/css" media="all">
+    @import "${tg.url('/static/css/style.css')}";
+    </style>
+    <script type="text/javascript" charset="utf-8" src="${tg.url('/static/javascript/prototype.js')}"></script>
+    <script type="text/javascript" charset="utf-8" src="${tg.url('/static/javascript/scriptaculous.js?load=effects')}"></script>
+    <script type="text/javascript" charset="utf-8" src="${tg.url('/static/javascript/ipautil.js')}"></script>
+</head>
+
+<body>
+
+    <div id="head">
+      <h1><a href="${tg.url('/')}">Free IPA</a></h1>
+      <div id="headerinfo">
+      </div>
+</div>
+      <div id="navbar">
+      </div>
+
+<div id="details">
+    <h1>Welcome</h1>
+    ${form.display(action = tg.url("/firstboot/create"))}
+</div>
+
+      <div id="footer">
+        <a href="http://www.freeipa.com/" target="_blank">Powered by FreeIPA</a>
+      </div>
+</body>
+
+</html>
diff -r 4186ae84839c ipa-server/ipa-gui/ipagui/templates/firstbootform.kid
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipa-server/ipa-gui/ipagui/templates/firstbootform.kid	Fri Jan 25 17:02:59 2008 +0000
@@ -0,0 +1,14 @@
+<div xmlns:py="http://purl.org/kid/ns#" class="simpleroster">
+
+  <form action="${action}" name="${name}" method="${method}" class="tableform">
+
+    Host Name : ${hostname.display()} <br/>
+    IP Address : ${ip.display()} <br/>
+    Realm : ${realm.display()} <br/>
+    Administrator Password : ${passwd.display()} <br/>
+
+    <input type="submit" class="submitbutton" name="submit" value="Next"/>
+
+  </form>
+
+</div>
