root/alternc/trunk/install/reset_root.php

Revision 1798, 1.7 kB (checked in by nahuel, 2 years ago)

Comme php5 peut etre installé, nous utilisons le lien php qui pointe soit vers php5 soit vers php4 ( soit php6 ? ).
close: #1042

Line 
1 #!/usr/bin/php -q
2 <?php
3 /*
4  $Id: reset_root.php,v 1.1 2005/01/19 05:37:18 anarcat Exp $
5  ----------------------------------------------------------------------
6  AlternC - Web Hosting System
7  Copyright (C) 2002 by the AlternC Development Team.
8  http://alternc.org/
9  ----------------------------------------------------------------------
10  Based on:
11  Valentin Lacambre's web hosting softwares: http://altern.org/
12  ----------------------------------------------------------------------
13  LICENSE
14
15  This program is free software; you can redistribute it and/or
16  modify it under the terms of the GNU General Public License (GPL)
17  as published by the Free Software Foundation; either version 2
18  of the License, or (at your option) any later version.
19
20  This program is distributed in the hope that it will be useful,
21  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23  GNU General Public License for more details.
24
25  To read the license please visit http://www.gnu.org/copyleft/gpl.html
26  ----------------------------------------------------------------------
27  Original Author of file: Benjamin Sonntag
28  Purpose of file: Create the first admin account on a new AlternC server
29  ----------------------------------------------------------------------
30 */
31
32 // Ne vérifie pas ma session :)
33 chdir("/var/alternc/bureau");
34 require("/var/alternc/bureau/class/config_nochk.php");
35
36 // On passe super-admin
37 $admin->enabled=1;
38
39 // On remet le pass admin a zero
40 if (!$admin->update_mem(2000,"postmaster@".$L_FQDN,"Administrateur", "Admin", $admin->getadmin(), 1, 1, "default")) {
41     echo "erreur : ".$err->errstr()."<br>\n";
42     exit();
43 }
44
45 ?>
46
Note: See TracBrowser for help on using the browser.