Login As A User Login As A User
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Login As A User

Started by Buddy Tison, January 08, 2007, 05:07:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Buddy Tison

Is there any way for the admin to log in as a user. After searching, I can not fine a topic that addresses that. I have a lot of photos that the db was lost in a move from a server because we could not get access to the bd. We got the photos but they do not have a connection to the new bd. What I want to do is to id the photos and log in as the person to add the photos back as them. Message boards allow this by the admin for but can not find it in CM. Am I missing this in the documentation? Thanks for any ideas on this  you may have that would allow me to do this.

Joachim Müller

Only way to log in as a particular user would be resetting the password of that user to a value the admin knows. After finishing the upload, you could set the old password back if you dumped coppermine's users table before resetting the password and then re-applied the old password hash.

Another option would be to upload the files as admin and then change ownership of those uploads (using a third party tool like phpMyAdmin). There's no control in coppermine's user interface to accomplish what you're up to.

Best solution (for the future) is to keep backups both of the database and the files on a regular basis.

Buddy Tison

Thanks for the quick reply. The problem was that we did not have complete access to our site via ftp. Sometimes things go bad with a host and the client gets beat up by a blood sucker outfit. Would have to sue them to get the latest data base and that just seemed more trouble than it was worth. We have complete control now. I will look into the php thing. It would be a nice feature to be able to log in as a user. Would have saved me some aggravation, thanks.
bt

Nibbler

If you edit bridge/coppermine.inc.php

$sql .= "user_name = '$username' AND BINARY user_password = '$encpassword' AND user_active = 'YES'";

you can set a master password by md5 hash, eg the password 'nibbler' would be

$sql .= "user_name = '$username' AND (BINARY user_password = '$encpassword' OR '$encpassword' = 'b1f28005494c5c2a58ac92b5b78d4eeb') AND user_active = 'YES'";

Make sure you are aware of the security implications before doing this.