Author Topic: Limit user login  (Read 6707 times)

Offline fbsd

  • Newbie
  • *
  • Posts: 7
Limit user login
« on: April 03, 2010, 09:53:51 AM »
Can someone tell me how to limit some users to login to webmail, and others to permit?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Limit user login
« Reply #1 on: April 04, 2010, 04:42:14 AM »
let the users who you want to grant access to login and then set auto_create_user to false in your config file, then only those users who have already logged in will be able too.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline fbsd

  • Newbie
  • *
  • Posts: 7
Limit user login
« Reply #2 on: April 04, 2010, 10:27:46 AM »
I was created the https and http access. HTTPS got own roundcube and http god own roundcube installation. I got 20 user accounts. I wan't to limit one user to access on roundcube on https to login to, and permit all other.
       Problem with auto_create_user was usless becouse https and http looking the same database. If i login on the http to RC and auto_create_user user will be granted.
« Last Edit: April 04, 2010, 10:40:59 AM by fbsd »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Limit user login
« Reply #3 on: April 04, 2010, 11:29:06 AM »
hmmm, that sounds like a job for a plugin. attach somethig to the authenticate hook which can check who is trying to login and how they are connecting and then either let me in or not.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline fbsd

  • Newbie
  • *
  • Posts: 7
Limit user login
« Reply #4 on: April 04, 2010, 12:31:57 PM »
OK, can u tell me a little explenation how can i enable the hook -> authenticate.
I think that is the line i need to setup in some file. Can u tell me the exact file?
$this->add_hook('authenticate', $callback);

And  can you explane me what i need to do else when add this line. How can i deny account to login
« Last Edit: April 04, 2010, 07:06:42 PM by fbsd »

Offline fbsd

  • Newbie
  • *
  • Posts: 7
Limit user login
« Reply #5 on: April 04, 2010, 07:27:17 PM »
Or is simplier solution how to limit one user to login only from one ip address?

Offline Mircea Tanciu

  • Jr. Member
  • **
  • Posts: 14
Limit user login
« Reply #6 on: August 05, 2010, 05:48:39 AM »
Quote from: fbsd;26596
Can someone tell me how to limit some users to login to webmail, and others to permit?

Hello,
I have the same problem but haven't seen a solution.
Please, tell me if you found something that resolve the problem.
Thanks.

Offline dziobak

  • Full Member
  • ***
  • Posts: 184
Limit user login
« Reply #7 on: August 05, 2010, 05:58:46 AM »
just set the:
$rcmail_config['auto_create_user'] = false;

and if you want user to log in, you must create the user in RC database.

Offline Mircea Tanciu

  • Jr. Member
  • **
  • Posts: 14
Limit user login
« Reply #8 on: August 05, 2010, 06:10:03 AM »
Thanks for your reply.
I want for example:
"user1@mydomain.tld" to access the RoundCube only from my local network and from some external IPs: (192.168.0.0/24 and 81.22.33.44). Can I define this list of IPs somewhere  from a user can access Roundcube? (for example in a roundcube MYSQL column table)
Thank you.

Offline dziobak

  • Full Member
  • ***
  • Posts: 184
Limit user login
« Reply #9 on: August 05, 2010, 06:57:47 AM »
I think you can write a plugin to handle this. For now there is nothing like this. (Maybe I'm wrong)

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Limit user login
« Reply #10 on: August 05, 2010, 08:24:52 AM »
As a starting point you could use my 'dnsbl' plugin.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)