Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Login As A User  (Read 2906 times)

0 Members and 1 Guest are viewing this topic.

Buddy Tison

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Login As A User
« on: January 08, 2007, 05:07:11 pm »

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.
« Last Edit: January 08, 2007, 05:33:19 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Login As A User
« Reply #1 on: January 08, 2007, 05:13:50 pm »

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.
Logged

Buddy Tison

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Login As A User
« Reply #2 on: January 08, 2007, 05:32:11 pm »

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
Logged

Nibbler

  • Guest
Re: Login As A User
« Reply #3 on: January 08, 2007, 09:31:53 pm »

If you edit bridge/coppermine.inc.php

Code: [Select]
$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

Code: [Select]
$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.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 15 queries.