Post a new topicPost a reply Page 1 of 2   [ 18 posts ]
Go to page 1, 2  Next
Author Message
 Post subject: Change Manager System Username & password from command line
PostPosted: Wed Aug 24, 2011 9:33 am 

Joined: Wed Jun 08, 2011 3:08 pm
Posts: 9
Can anybody assist me to change / set the username and password for the Manager System from the command line interface


Top
 Profile  
 
 Post subject: Re: Change Manager System Username & password from command line
PostPosted: Wed Aug 24, 2011 4:37 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Connect to meshlium using command line, and create a file called pass.php and write the following inside it (you can change 'libelium' to your custom password):
Code:
<?php echo 'MD5:          ' . crypt('libelium', '$1$5eq/nWmt$') . "\n"; ?>


Now execute the following this way:
Code:
php pass.php

You will see this result:
Code:
MD5:          $1$5eq/nWmt$lIVjHx53nCi8yRz.cr98Z1


You have to put this line in the file /var/www/ManagerSystem/core/globals/users.php:
Code:
'root' => '$1$5eq/nWmt$lIVjHx53nCi8yRz.cr98Z1',


You can add more users this way of rename the 'root' username.


Top
 Profile  
 
 Post subject: Re: Change Manager System Username & password from command line
PostPosted: Thu Aug 25, 2011 9:57 am 

Joined: Wed Jun 08, 2011 3:08 pm
Posts: 9
I have created the file as instructed

However when trying to execute

php pass.php

It gives me

Command Unknown


I need to know which php cli to use on this unit


Top
 Profile  
 
 Post subject: Re: Change Manager System Username & password from command line
PostPosted: Thu Aug 25, 2011 10:32 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Try executing the same command, but with full route:
Code:
/usr/bin/php pass.php


Also you can confirm that your php program has cli support executing:
Code:
meshlium:~# php -v
PHP 5.2.6-1+lenny8 with Suhosin-Patch 0.9.6.2 (cli) (built: Mar 14 2010 08:14:04)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies


Top
 Profile  
 
 Post subject: Re: Change Manager System Username & password from command line
PostPosted: Thu Aug 25, 2011 11:37 am 

Joined: Wed Jun 08, 2011 3:08 pm
Posts: 9
When executing

/usr/bin/php pass.php

it gives me

Command unknown

Same result for

php -v


Top
 Profile  
 
 Post subject: Re: Change Manager System Username & password from command line
PostPosted: Thu Aug 25, 2011 12:56 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
I guess you're not using the Manager System installed in a Meshlium, because by default the php binary location is that. What linux distribution are you using?


Top
 Profile  
 
 Post subject: Re: Change Manager System Username & password from command line
PostPosted: Thu Aug 25, 2011 1:08 pm 

Joined: Wed Jun 08, 2011 3:08 pm
Posts: 9
Yes, this is a Meshlium and the version info from

Code:
cat /ect/issue


gives

Quote:
Debian GNU/Linux 4.0 \n \l


Top
 Profile  
 
 Post subject: Re: Change Manager System Username & password from command line
PostPosted: Thu Aug 25, 2011 1:33 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Perhaps your Meshlium has an old system. What version gives you under the help tab?


Top
 Profile  
 
 Post subject: Re: Change Manager System Username & password from command line
PostPosted: Thu Aug 25, 2011 1:36 pm 

Joined: Wed Jun 08, 2011 3:08 pm
Posts: 9
Cannot access manager - cannot look under help tab


Top
 Profile  
 
 Post subject: Re: Change Manager System Username & password from command line
PostPosted: Thu Aug 25, 2011 1:48 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Search in the /var/www/ManagerSystem/indexphp file for a line like the following:
Code:
$manager_system_version="2.0.3";


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 2   [ 18 posts ]
Go to page 1, 2  Next


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use