[Fusionforge-commits] r11002 - in trunk/src: packaging/install utils

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Oct 15 11:27:25 CEST 2010


Author: lolando
Date: 2010-10-15 11:27:25 +0200 (Fri, 15 Oct 2010)
New Revision: 11002

Added:
   trunk/src/utils/forge_set_password
Modified:
   trunk/src/packaging/install/db-postgresql
Log:
Added simple script to change a user's password from the command-line

Modified: trunk/src/packaging/install/db-postgresql
===================================================================
--- trunk/src/packaging/install/db-postgresql	2010-10-14 21:39:40 UTC (rev 11001)
+++ trunk/src/packaging/install/db-postgresql	2010-10-15 09:27:25 UTC (rev 11002)
@@ -66,3 +66,4 @@
 utils/inject-files.php usr/share/@OLDPACKAGE@/bin/
 #
 utils/fixscripts/normalize_roles.php	usr/share/@OLDPACKAGE@/bin/
+utils/forge_get_config                  usr/share/@OLDPACKAGE@/bin/

Added: trunk/src/utils/forge_set_password
===================================================================
--- trunk/src/utils/forge_set_password	                        (rev 0)
+++ trunk/src/utils/forge_set_password	2010-10-15 09:27:25 UTC (rev 11002)
@@ -0,0 +1,54 @@
+#! /usr/bin/php -f
+<?php
+/**
+ * FusionForge
+ *
+ * Copyright 2010, Roland Mas
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ * 
+ * FusionForge is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+        
+require (dirname(__FILE__).'/../common/include/env.inc.php');
+require_once $gfcommon.'include/pre.php';
+
+if (count ($argv) == 3) {
+	$u = $argv[1] ;
+	$p = $argv[2] ;
+	$user = user_get_object_by_name ($u) ;
+	if (!$user || $user->isError()) {
+		echo "Can't find this user...
+" ;
+		exit (1) ;
+	}
+	if (!$user->setPasswd ($p)) {
+		echo "An error occurred.  Weak password?
+" ;
+		exit (1) ;
+	}
+} else {
+	echo "Usage: .../forge_set_password <username> <password>
+" ;
+        exit (1) ;
+}
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>


Property changes on: trunk/src/utils/forge_set_password
___________________________________________________________________
Added: svn:executable
   + *




More information about the Fusionforge-commits mailing list