forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 permissions => Topic started by: jleonard on May 08, 2012, 03:03:10 pm
-
I apologize if this has already been answered, but I could not find a thread addressing this issue. I have at least 50 albums, so for me to change access permissions "by album" (via creating a password), is extremely tedious. Is there a way for me to create a password for an entire category? If not, is there a way to "batch" create a password for all of these albums?
-
Actually, it's over a 100 albums.
-
Is there a way for me to create a password for an entire category?
That not possible.
is there a way to "batch" create a password for all of these albums?
Set the password for one album. Then, have a look at your database and find that album to get the password hash. Now you can execute a query like
UPDATE cpg15x_albums SET alb_password = '098f6bcd4621d373cade4e832627b4f6' WHERE category = '123'
-
That not possible.
Set the password for one album. Then, have a look at your database and find that album to get the password hash. Now you can execute a query like
UPDATE cpg15x_albums SET alb_password = '098f6bcd4621d373cade4e832627b4f6' WHERE category = '123'
Interesting...thanks for writing. Could I also do the same for the Password Hint? Where would I paste that code, would it be "within" the database, or via the gallery somehow? I can go into mysql database, but I'm not that familiar with how to edit multiple fields or entries.
-
Could I also do the same for the Password Hint?
Sure. The query would look like
UPDATE cpg15x_albums SET alb_password = '098f6bcd4621d373cade4e832627b4f6', alb_password_hint = 'test' WHERE category = '123'
-
Sure. The query would look like
UPDATE cpg15x_albums SET alb_password = '098f6bcd4621d373cade4e832627b4f6', alb_password_hint = 'test' WHERE category = '123'
So, where do I enter that code? Somewhere in the gallery settings, or somewhere in MySQL?
-
In PHPMyAdmin or a similar tool.
-
In PHPMyAdmin or a similar tool.
Would anyone be willing to give me instructions to do this? I'm not a script programmer, I'm just a photographer.
Thanks in advance.
-
Login to PHPMyAdmin, select your Coppermine database, open the "SQL" tab, copy the adjusted query to the text box and hit "Go".
-
Login to PHPMyAdmin, select your Coppermine database, open the "SQL" tab, copy the adjusted query to the text box and hit "Go".
Thanks. Did that, and it returned a green checkmark, but says "0 rows affected". Here was my edited code...
UPDATE cpg_albums SET alb_password = 'mckinney', alb_password_hint = 'In what city do the Leonards live? (all lowercase)' WHERE category = '2012'
-
And now I can't even login to my admin account!
-
You have to enter the category's ID, not the category's name at the bold part:
UPDATE cpg_albums SET alb_password = 'mckinney', alb_password_hint = 'In what city do the Leonards live? (all lowercase)' WHERE category = '2012'
-
You have to enter the category's ID, not the category's name at the bold part:
Ok, I'll try that, thanks. So, how did this query mess up my logins? It doesn't even recognize my login anymore. The users are still listed in the databases however.
-
I don't know, as if haven't tested it. Do you get an error message? I guess Coppermine tries to access a non-existing category.
Additionally, your password is invalid. Please read my first reply how to get a valid password.
-
I don't know, as if haven't tested it. Do you get an error message? I guess Coppermine tries to access a non-existing category.
Additionally, your password is invalid. Please read my first reply how to get a valid password.
Error returns "Login failed. Try again."
I read your first post...what's a password "hash?"
-
And when I try to access the particular "album" via password, it says "invalid password."
-
when I try to access the particular "album" via password, it says "invalid password."
That's what I already told you. Please just follow my instructions (copy an already existing hash).
what's a password "hash?"
That's the value which is stored e.g. in the alb_password field. More information here (http://en.wikipedia.org/wiki/MD5#MD5_hashes).
I guess Coppermine tries to access a non-existing category.
That's of course nonsense. I mixed up two threads, sorry.
-
OK, I'm not explaining myself very well apparently. I have two issues now...
1. The album passwords: I changed them all to a word, not a hexadecimal string. Again, I am not a programmer, so when you said to copy the code, I did...and I entered a regular word, not a hexadecimal string. So, the strings are all gone now...and I can't even login to the gallery to create a password because of No. 2 below!
2. The User Login passwords: NONE of them work anymore! I can't login to my gallery...at all.
-
Andre, please help if you can. My gallery is completely innaccessible since I edited the database, and I've given out the link to a bunch of parents for a baseball team. I don't know why I cannot login from any user (or admin) account since I ran those queries.
-
I don't know what exactly you did, but that query shouldn't affect the user logins. To investigate that issue I just sent you a PM.
-
Thanks for helping out. Not sure what happened, but I was able to hit "forgot your password?" and created a new admin password, which allowed me to go into one album and create the password to use for the code.
Thanks again.