diff --git a/acceptance/openstack/compute_test.go b/acceptance/openstack/compute_test.go
index 4c487c7..f8c80f5 100644
--- a/acceptance/openstack/compute_test.go
+++ b/acceptance/openstack/compute_test.go
@@ -184,3 +184,30 @@
 		return
 	}
 }
+
+func TestServerAction(t *testing.T) {
+	ts, err := setupForCRUD()
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	err = createServer(ts)
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	defer func(){
+		servers.Delete(ts.client, ts.createdServer.Id)
+	}()
+
+	err = waitForStatus(ts, "ACTIVE")
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	err = changeAdminPassword(ts)
+	if err != nil {
+		t.Fatal(err)
+	}
+}
+
diff --git a/acceptance/openstack/tools_test.go b/acceptance/openstack/tools_test.go
index c9a004f..0743221 100644
--- a/acceptance/openstack/tools_test.go
+++ b/acceptance/openstack/tools_test.go
@@ -169,13 +169,13 @@
 		}
 
 		if ts.gottenServer.Status == s {
-			fmt.Printf("Server created after %d seconds (approximately)\n", 300-timeout)
+			fmt.Printf("Server reached state %s after %d seconds (approximately)\n", s, 300-timeout)
 			break
 		}
 	}
 
 	if err == errTimeout {
-		fmt.Printf("I'm not waiting around.\n")
+		fmt.Printf("Time out -- I'm not waiting around.\n")
 		err = nil
 	}
 
@@ -229,6 +229,27 @@
 	return err
 }
 
+func changeAdminPassword(ts *testState) error {
+	fmt.Println("Current password: "+ts.createdServer.AdminPass)
+	randomPassword := randomString("", 16)
+	for randomPassword == ts.createdServer.AdminPass {
+		randomPassword = randomString("", 16)
+	}
+	fmt.Println("    New password: "+randomPassword)
+	
+	err := servers.ChangeAdminPassword(ts.client, ts.createdServer.Id, randomPassword)
+	if err != nil {
+		return err
+	}
+	
+	err = waitForStatus(ts, "PASSWORD")
+	if err != nil {
+		return err
+	}
+	
+	return waitForStatus(ts, "ACTIVE")
+}
+
 // randomString generates a string of given length, but random content.
 // All content will be within the ASCII graphic character set.
 // (Implementation from Even Shaw's contribution on
diff --git a/openstack/compute/servers/client.go b/openstack/compute/servers/client.go
index 3d51dd8..3ce6965 100644
--- a/openstack/compute/servers/client.go
+++ b/openstack/compute/servers/client.go
@@ -42,6 +42,10 @@
 	return c.getDeleteUrl(id)
 }
 
+func (c *Client) getActionUrl(id string) string {
+	return fmt.Sprintf("%s/servers/%s/action", c.endpoint, id)
+}
+
 func (c *Client) getListHeaders() (map[string]string, error) {
 	t, err := c.getAuthToken()
 	if err != nil {
@@ -69,6 +73,10 @@
 	return c.getListHeaders()
 }
 
+func (c *Client) getActionHeaders() (map[string]string, error) {
+	return c.getListHeaders()
+}
+
 func (c *Client) getAuthToken() (string, error) {
 	var err error
 
diff --git a/openstack/compute/servers/requests.go b/openstack/compute/servers/requests.go
index 28abd1c..772699b 100644
--- a/openstack/compute/servers/requests.go
+++ b/openstack/compute/servers/requests.go
@@ -96,3 +96,21 @@
 	})
 	return sr, err
 }
+
+// ChangeAdminPassword alters the administrator or root password for a specified
+// server.
+func ChangeAdminPassword(c *Client, id, newPassword string) error {
+	h, err := c.getActionHeaders()
+	if err != nil {
+		return err
+	}
+
+	err = perigee.Post(c.getActionUrl(id), perigee.Options{
+		ReqBody: struct{C map[string]string `json:"changePassword"`}{
+			map[string]string{"adminPass": newPassword},
+		},
+		MoreHeaders: h,
+		OkCodes: []int{202},
+	})
+	return err
+}
diff --git a/openstack/compute/servers/servers.go b/openstack/compute/servers/servers.go
index e3bdbe3..28d66d0 100644
--- a/openstack/compute/servers/servers.go
+++ b/openstack/compute/servers/servers.go
@@ -36,6 +36,9 @@
 // Metadata includes a list of all user-specified key-value pairs attached to the server.
 //
 // Links includes HTTP references to the itself, useful for passing along to other APIs that might want a server reference.
+//
+// AdminPass will generally be empty ("").  However, it will contain the administrative password chosen when provisioning a new server without a set AdminPass setting in the first place.
+// Note that this is the ONLY time this field will be valid.
 type Server struct {
 	Id         string
 	TenantId   string `mapstructure:tenant_id`
@@ -53,6 +56,7 @@
 	Addresses  map[string]interface{}
 	Metadata   map[string]interface{}
 	Links      []interface{}
+	AdminPass  string `mapstructure:adminPass`
 }
 
 // GetServers interprets the result of a List() call, producing a slice of Server entities.
