diff --git a/ldap-account-manager/lam-setpass b/ldap-account-manager/lam-setpass
index 4e482f41102ce08a973dd4a0e53d1051988178e8..fca0a53935fa81b0677547edb28fbadf8e4e34c2 100755
--- a/ldap-account-manager/lam-setpass
+++ b/ldap-account-manager/lam-setpass
@@ -9,6 +9,7 @@ $cfg->setPassword($argv[1]);
 $cfg->save();
 
 // For the server profiles.
-$conf = new LAMConfig("lam");
+$profile_manager = new ServerProfilePersistenceManager();
+$conf = $profile_manager->loadProfile("lam");
 $conf->set_Passwd($argv[1]);
-$conf->save();
+$profile_manager->saveProfile($conf, "lam");