Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Dec 16, 2018 6:20 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Exporting 400+ users from CactiEZ v0.8.8a to Cacti v1.1.28
PostPosted: Thu Dec 21, 2017 6:21 am 
Offline

Joined: Wed Dec 20, 2017 3:51 am
Posts: 9
Hi

i need help exporting about 400 + users from a cacti system (CactiEZ with Version 0.8.8a) to another cacti system (Version 1.1.28)

creating every user manually and also communicating the new passwords to users will be quite a task,
can some suggest how i can go about achieving this?

Regards

Clifford Dsouza


Top
 Profile  
 
 Post subject: Re: Exporting 400+ users from CactiEZ v0.8.8a to Cacti v1.1.
PostPosted: Thu Dec 21, 2017 7:15 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1818
You can use the cli to add users I believe by copying a template.

Code:
cd <cacti>/cli
php copy_user.php <template user> <new user>


Once you have done that for each user in question. You can then update their password using a combination of PHP and MySQL.

You can generate a password using the following for PHP 5.5 or above:
Code:
echo "New password hash: " . password_hash('<password>',PASSWORD_DEFAULT);


Or using the following for older versions:
Code:
echo "New password hash: " .md5('<password>');


With a password hash, you then update the user_auth table via MySQL's cli using the following SQL statement:

Code:
UPDATE `user_auth` SET password = '<hash>' where username = '<username>';


You could even update the "New password hash" output to include the SQL so it's just a copy and paste job.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Exporting 400+ users from CactiEZ v0.8.8a to Cacti v1.1.
PostPosted: Tue Dec 26, 2017 1:42 am 
Offline

Joined: Wed Dec 20, 2017 3:51 am
Posts: 9
Thank you netniV


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group