Get support from Xavier Media
It is currently Sun Dec 08, 2013 2:42 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Bulk loading users in cookie password
PostPosted: Mon Sep 07, 2009 3:10 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Tue Sep 01, 2009 1:01 pm
Posts: 6
Points: 0
Hello,

I have purchased and install the cookie password product the other day. I have about 100 users that I have inserted into the database pp29_users and when I look at the table I see the users. When I load the admin.php it doesn't display any of the users I have added manually. What is the trick to bulk loading user accounts into the system?

Thanks,

TCox


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Bulk loading users in cookie password
PostPosted: Mon Sep 07, 2009 4:06 am 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
They must belong to a group too, like users for example. Otherwise they wont show up.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Bulk loading users in cookie password
PostPosted: Mon Sep 07, 2009 5:15 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Tue Sep 01, 2009 1:01 pm
Posts: 6
Points: 0
Right after I typed it in I added a group id to each user and they showed up. The problem I am having now is with passwords. I used the following sql code to update the user's passwords:

UPDATE pp29_users SET password=PASSWORD("password1") WHERE login='maint';

The statement above is for one of the users and when I execute the query phpmyadmin reports back that no rows are affected. I can apply this to any of the existing users in the pp29_users table. I was able to insert the passwords to begin with but when I try to login it fails.

Is there any special trick to updating passwords?

Thanks again,

TCox


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Bulk loading users in cookie password
PostPosted: Mon Sep 07, 2009 4:51 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Create a php file called for example updatepassword.php and upload it to the same directory as your settings.php. The file should look like this:
Code:
<?
include(Settings.php");
$user_info = mysql_query("SELECT * FROM $UserTable WHERE ugroup <> 'admin'");
while ($u = mysql_fetch_array($user_info))
{
   $userpassword = md5($u[password]);
   mysql_query("UPDATE $UserTable SET password = '$userpassword' WHERE login = '$u[login]'");
   echo $u[login] .'\'s password updated<BR />';
}

?>

Only run the file once and delete it from your server after.

This script requires that you've uploaded the user passwords as clear text (i.e. readable by humans). All passwords except for the admin password will be encrypted.

/Bylla

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Bulk loading users in cookie password
PostPosted: Wed Sep 09, 2009 3:16 pm 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Tue Sep 01, 2009 1:01 pm
Posts: 6
Points: 0
Thanks Bylla for the information. I was able to bulk load all of the users and set the passwords. The only way I can protect my pages is to put the settings file in the root webdocs directory. Is there a better option?


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Bulk loading users in cookie password
PostPosted: Fri Sep 11, 2009 4:09 am 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
On some servers that's the only solution. protection.php will search for settings.php and if it can only find it in the root webdocs directory, then that's the only solution.

/Bylla

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Registered users: No registered users


You can post new topics in this forum
You can 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:  
cron

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]