Author Topic: Help needed  (Read 3628 times)

Offline frankausberlin

  • Newbie
  • *
  • Posts: 4
Help needed
« on: May 30, 2012, 12:11:45 PM »
ok sorry guys but i have a problem and no solution - and yes - i already asked our friend google.

is it possible to set somewhere in the config a fixed password?

i have some users - that should use roundcube as an standart email client so the usernames are different - but the password is always the same  but i dont want
to tell the users what the password is.

so i have user blackberry and user strawberry and the password is always n00b - all i want is that the users go to the
loginpage of the internal rc server enter the username and get the desired mails....

i found one posting:

http://blog.aidam.de/index.php?/archives/1-Howto-customize-your-roundcube-webmail-service-in-an-easy-way.html

but this one does not work :-(

help guys  :'(

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Help needed
« Reply #1 on: May 30, 2012, 07:12:50 PM »
So just to confirm you just want the user to type in the username and not any password? No other form of security?

Offline frankausberlin

  • Newbie
  • *
  • Posts: 4
Re: Help needed
« Reply #2 on: May 31, 2012, 03:42:08 AM »
right - the security in this case... the user enters just his username without password because the password needs to be fixed
without telling the user...

so bob parker would have the same password on the imap server as peter tosh but since they dont know the password
they are not able to read the emails from outside the office but they can access the mails at the office on any computer
without setting up an mail account in some stupid email program because the only have to enter ther user name without password

:-)

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Help needed
« Reply #3 on: May 31, 2012, 04:46:34 AM »
Well as long as you have the security figured out a simple plugin like the following should work.
Code: [Select]
<?php
class singlepassword extends rcube_plugin {
  public 
$task 'login';

  function 
init() {
    
$this->add_hook('authenticate', array($this'authenticate'));
  }

  function 
authenticate($args) {
    
$args['pass'] = 'The Password';
  
    return 
$args;
  }
}
?>


Offline frankausberlin

  • Newbie
  • *
  • Posts: 4
Re: Help needed
« Reply #4 on: May 31, 2012, 07:40:57 AM »
thx skaero,
that looks good - not sure if you got my pm about the plugin...

saved it - named it - placed it in the plugin folder - and then? - do i have to replace something at the index.php aswell?

f_

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Help needed
« Reply #5 on: May 31, 2012, 09:57:15 AM »
Sorry I should written directions, just save that code to a file named "singlepassword.php" and put that in a folder named "singlepassword" in the RoundCube plugins directory then edit the <RC root>/config/main.inc.php and add "singlepassword" to the $rcmail_config['plugins'] array. Then you should be able to enter any password on the login page. With a little bit more work you could remove the password field altogether.

Offline frankausberlin

  • Newbie
  • *
  • Posts: 4
Re: Help needed
« Reply #6 on: May 31, 2012, 10:11:13 AM »
SKaero - YOU ARE THE MAN!

many many thanks you made my day