How to manage thousands of users?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

How to manage thousands of users?

CJ Keist
The web interface doesn't look to have the ability to list thousands of
users on my owncloud system. So there is no way for me to set custom
disk quotas for users that are not displayed on the web interface.  I
have tried the search function on the page but that doesn't work.
So I tried to see where disk quota settings are stored on the mysql
database but have not had any luck finding where that value is set per
user account.  Could someone direct me on how I can set default disk
quota for users on my system?


--
C. J. Keist                     Email: [hidden email]
Systems Group Manager           Solaris 10 OS (SAI)
Engineering Network Services    Phone: 970-491-0630
College of Engineering, CSU     Fax:   970-491-5569
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud
Reply | Threaded
Open this post in threaded view
|

Re: How to manage thousands of users?

Romain

In oc_preferences you have the quota per user.

Le 27 sept. 2013 22:28, "CJ Keist" <[hidden email]> a écrit :
The web interface doesn't look to have the ability to list thousands of users on my owncloud system. So there is no way for me to set custom disk quotas for users that are not displayed on the web interface.  I have tried the search function on the page but that doesn't work.
So I tried to see where disk quota settings are stored on the mysql database but have not had any luck finding where that value is set per user account.  Could someone direct me on how I can set default disk quota for users on my system?


--
C. J. Keist                     Email: [hidden email]
Systems Group Manager           Solaris 10 OS (SAI)
Engineering Network Services    Phone: 970-491-0630
College of Engineering, CSU     Fax:   970-491-5569
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud
Reply | Threaded
Open this post in threaded view
|

Re: How to manage thousands of users?

Stefan Vollmar
In reply to this post by CJ Keist
Dear CJ Keist,

On 27.09.2013, at 22:28, CJ Keist <[hidden email]> wrote:

> The web interface doesn't look to have the ability to list thousands of users on my owncloud system. So there is no way for me to set custom disk quotas for users that are not displayed on the web interface.  I have tried the search function on the page but that doesn't work.
> So I tried to see where disk quota settings are stored on the mysql database but have not had any luck finding where that value is set per user account.  Could someone direct me on how I can set default disk quota for users on my system?

I am not sure that this is the "official" way of doing things but I would suggest a different approach: if you use the MySQL backend, it seems to be pretty straightforward to set all sorts of parameters with a few lines of SQL code. In fact, this is similar to our own automated method of creating a large number of users in OwnCloud and sending automatically generated E-mails with activation links (tokens).

With OwnCloud 5, you can look up user data in the oc_user table (here: "aeinstein" is the "uid" of "Albert Einstein"), you can then set a quota of 10 GB like this:

INSERT INTO `oc_preferences` VALUES
 ('aeinstein','files','quota','10 GB');

If you have a list of uids it is very easy to repeat that line as often as required.

Warm regards,
 Stefan

>
>
> --
> C. J. Keist                     Email: [hidden email]
> Systems Group Manager           Solaris 10 OS (SAI)
> Engineering Network Services    Phone: 970-491-0630
> College of Engineering, CSU     Fax:   970-491-5569
> Ft. Collins, CO 80523-1301
>
> All I want is a chance to prove 'Money can't buy happiness'
>
> _______________________________________________
> Owncloud mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/owncloud
--
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleueler Str. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
E-Mail: [hidden email]   http://www.nf.mpg.de




_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to manage thousands of users?

CJ Keist
In reply to this post by Romain
I don't have that table in my database. See attached pic.


On 9/27/13 3:15 PM, Romain wrote:

In oc_preferences you have the quota per user.

Le 27 sept. 2013 22:28, "CJ Keist" <[hidden email]> a écrit :
The web interface doesn't look to have the ability to list thousands of users on my owncloud system. So there is no way for me to set custom disk quotas for users that are not displayed on the web interface.  I have tried the search function on the page but that doesn't work.
So I tried to see where disk quota settings are stored on the mysql database but have not had any luck finding where that value is set per user account.  Could someone direct me on how I can set default disk quota for users on my system?


--
C. J. Keist                     Email: [hidden email]
Systems Group Manager           Solaris 10 OS (SAI)
Engineering Network Services    Phone: 970-491-0630
College of Engineering, CSU     Fax:   970-491-5569
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud


_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud

-- 
C. J. Keist                     Email: [hidden email]
Systems Group Manager           Solaris 10 OS (SAI)
Engineering Network Services    Phone: 970-491-0630
College of Engineering, CSU     Fax:   970-491-5569
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud

Screen Shot 2013-09-27 at 4.18.19 PM.png (241K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to manage thousands of users?

Jakub Moscicki
In reply to this post by Stefan Vollmar
Hello,

I found this tool - I have not tested all functionality (only file upload with admin masquerading) but it also has the set_quota option:

http://forum.owncloud.org/viewtopic.php?t=8684

kuba

--

On Sep 28, 2013, at 12:18 AM, Stefan Vollmar <[hidden email]>
 wrote:

Dear CJ Keist,

On 27.09.2013, at 22:28, CJ Keist <[hidden email]> wrote:

The web interface doesn't look to have the ability to list thousands of users on my owncloud system. So there is no way for me to set custom disk quotas for users that are not displayed on the web interface.  I have tried the search function on the page but that doesn't work.
So I tried to see where disk quota settings are stored on the mysql database but have not had any luck finding where that value is set per user account.  Could someone direct me on how I can set default disk quota for users on my system?

I am not sure that this is the "official" way of doing things but I would suggest a different approach: if you use the MySQL backend, it seems to be pretty straightforward to set all sorts of parameters with a few lines of SQL code. In fact, this is similar to our own automated method of creating a large number of users in OwnCloud and sending automatically generated E-mails with activation links (tokens).

With OwnCloud 5, you can look up user data in the oc_user table (here: "aeinstein" is the "uid" of "Albert Einstein"), you can then set a quota of 10 GB like this:

INSERT INTO `oc_preferences` VALUES
('aeinstein','files','quota','10 GB');

If you have a list of uids it is very easy to repeat that line as often as required.

Warm regards,
Stefan



--
C. J. Keist                     Email: [hidden email]
Systems Group Manager           Solaris 10 OS (SAI)
Engineering Network Services    Phone: 970-491-0630
College of Engineering, CSU     Fax:   970-491-5569
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud

--
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleueler Str. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
E-Mail: [hidden email]   http://www.nf.mpg.de



_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud


_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud
Reply | Threaded
Open this post in threaded view
|

Re: How to manage thousands of users?

Jakub Moscicki
Hello again,

Let me share a small script that I recently wrote by analysing the API. I would appreciate if the owncloud developers could comment if this is a right approach - it works for me but it has been developed purely experimentally and maybe there are some loopholes.

It creates a user account and sets up the filesystem. Just run this script on the server possibly adjusting the location of your ownloud path.

I use it for creating test accounts.

I hope this will be useful for you, too.

kuba

--

create_test_user.php:

<?php

# Create local user account.
#
# Author: Jakub T. Moscicki, 2013, CERN/IT
#
# To be placed and run on the owncloud application server: 
#
#  php -f create_test_user.php USER PASSWORD
#

set_include_path(get_include_path() . PATH_SEPARATOR . '/var/www/html/owncloud');

require_once 'lib/base.php';

$login = $argv[1];
$password = $argv[2];

if(OC_User::userExists($login)) {
  print "user already exists:".$login."\n";
  OC_User::setPassword($login,$password);
  print "password overwritten\n";
}
else
  {
    print "creating user... \n";
    OC_User::createUser($login,$password);
    print "user created and password set:".$login."\n";
    OC_Util::setupFS($login);
    print "setup FS done\n";
  }

?>




On Sep 28, 2013, at 10:35 AM, Jakub Moscicki <[hidden email]> wrote:

Hello,

I found this tool - I have not tested all functionality (only file upload with admin masquerading) but it also has the set_quota option:

http://forum.owncloud.org/viewtopic.php?t=8684

kuba

--

On Sep 28, 2013, at 12:18 AM, Stefan Vollmar <[hidden email]>
 wrote:

Dear CJ Keist,

On 27.09.2013, at 22:28, CJ Keist <[hidden email]> wrote:

The web interface doesn't look to have the ability to list thousands of users on my owncloud system. So there is no way for me to set custom disk quotas for users that are not displayed on the web interface.  I have tried the search function on the page but that doesn't work.
So I tried to see where disk quota settings are stored on the mysql database but have not had any luck finding where that value is set per user account.  Could someone direct me on how I can set default disk quota for users on my system?

I am not sure that this is the "official" way of doing things but I would suggest a different approach: if you use the MySQL backend, it seems to be pretty straightforward to set all sorts of parameters with a few lines of SQL code. In fact, this is similar to our own automated method of creating a large number of users in OwnCloud and sending automatically generated E-mails with activation links (tokens).

With OwnCloud 5, you can look up user data in the oc_user table (here: "aeinstein" is the "uid" of "Albert Einstein"), you can then set a quota of 10 GB like this:

INSERT INTO `oc_preferences` VALUES
('aeinstein','files','quota','10 GB');

If you have a list of uids it is very easy to repeat that line as often as required.

Warm regards,
Stefan



--
C. J. Keist                     Email: [hidden email]
Systems Group Manager           Solaris 10 OS (SAI)
Engineering Network Services    Phone: 970-491-0630
College of Engineering, CSU     Fax:   970-491-5569
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud

--
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleueler Str. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
E-Mail: [hidden email]   http://www.nf.mpg.de



_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud


_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud
Reply | Threaded
Open this post in threaded view
|

Re: How to manage thousands of users?

CJ Keist
In reply to this post by Stefan Vollmar
Could someone send me the the table structure for oc_preferneces? For
some reason my database doesn't have it.

On 9/27/13 4:18 PM, Stefan Vollmar wrote:

> Dear CJ Keist,
>
> On 27.09.2013, at 22:28, CJ Keist <[hidden email]> wrote:
>
>> The web interface doesn't look to have the ability to list thousands of users on my owncloud system. So there is no way for me to set custom disk quotas for users that are not displayed on the web interface.  I have tried the search function on the page but that doesn't work.
>> So I tried to see where disk quota settings are stored on the mysql database but have not had any luck finding where that value is set per user account.  Could someone direct me on how I can set default disk quota for users on my system?
>
> I am not sure that this is the "official" way of doing things but I would suggest a different approach: if you use the MySQL backend, it seems to be pretty straightforward to set all sorts of parameters with a few lines of SQL code. In fact, this is similar to our own automated method of creating a large number of users in OwnCloud and sending automatically generated E-mails with activation links (tokens).
>
> With OwnCloud 5, you can look up user data in the oc_user table (here: "aeinstein" is the "uid" of "Albert Einstein"), you can then set a quota of 10 GB like this:
>
> INSERT INTO `oc_preferences` VALUES
>   ('aeinstein','files','quota','10 GB');
>
> If you have a list of uids it is very easy to repeat that line as often as required.
>
> Warm regards,
>   Stefan
>
>>
>>
>> --
>> C. J. Keist                     Email: [hidden email]
>> Systems Group Manager           Solaris 10 OS (SAI)
>> Engineering Network Services    Phone: 970-491-0630
>> College of Engineering, CSU     Fax:   970-491-5569
>> Ft. Collins, CO 80523-1301
>>
>> All I want is a chance to prove 'Money can't buy happiness'
>>
>> _______________________________________________
>> Owncloud mailing list
>> [hidden email]
>> https://mail.kde.org/mailman/listinfo/owncloud
>

--
C. J. Keist                     Email: [hidden email]
Systems Group Manager           Solaris 10 OS (SAI)
Engineering Network Services    Phone: 970-491-0630
College of Engineering, CSU     Fax:   970-491-5569
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'
_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud
Reply | Threaded
Open this post in threaded view
|

Re: How to manage thousands of users?

Soma Kashyap
here you go...


+--------+----------------+---------------+-------------+
| userid | appid          | configkey     | configvalue |
+--------+----------------+---------------+-------------+
| admin  | files          | cache_version | 5           |
| admin  | firstrunwizard | show          | 0           |
+--------+----------------+---------------+-------------+
2 rows in set (0.00 sec)




On Mon, Sep 30, 2013 at 10:17 AM, CJ Keist <[hidden email]> wrote:
Could someone send me the the table structure for oc_preferneces? For some reason my database doesn't have it.

On 9/27/13 4:18 PM, Stefan Vollmar wrote:
Dear CJ Keist,

On 27.09.2013, at 22:28, CJ Keist <[hidden email]> wrote:

The web interface doesn't look to have the ability to list thousands of users on my owncloud system. So there is no way for me to set custom disk quotas for users that are not displayed on the web interface.  I have tried the search function on the page but that doesn't work.
So I tried to see where disk quota settings are stored on the mysql database but have not had any luck finding where that value is set per user account.  Could someone direct me on how I can set default disk quota for users on my system?

I am not sure that this is the "official" way of doing things but I would suggest a different approach: if you use the MySQL backend, it seems to be pretty straightforward to set all sorts of parameters with a few lines of SQL code. In fact, this is similar to our own automated method of creating a large number of users in OwnCloud and sending automatically generated E-mails with activation links (tokens).

With OwnCloud 5, you can look up user data in the oc_user table (here: "aeinstein" is the "uid" of "Albert Einstein"), you can then set a quota of 10 GB like this:

INSERT INTO `oc_preferences` VALUES
  ('aeinstein','files','quota','10 GB');

If you have a list of uids it is very easy to repeat that line as often as required.

Warm regards,
  Stefan



--
C. J. Keist                     Email: [hidden email]
Systems Group Manager           Solaris 10 OS (SAI)
Engineering Network Services    Phone: 970-491-0630
College of Engineering, CSU     Fax:   970-491-5569
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud


--
C. J. Keist                     Email: [hidden email]
Systems Group Manager           Solaris 10 OS (SAI)
Engineering Network Services    Phone: 970-491-0630
College of Engineering, CSU     Fax:   970-491-5569
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'
_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud


_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud
Reply | Threaded
Open this post in threaded view
|

Re: How to manage thousands of users?

Chris-3
In reply to this post by CJ Keist
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: How to manage thousands of users?

Stefan Vollmar
In reply to this post by Jakub Moscicki
Hello,

please find attached a script for setting the quota for existing users. It was inspired by Jakub's email and also aims at automated, scriptable administration of an owncloud instance.

<?php

# Set quota for existing user.
# Author: Stefan Vollmar, 2013, MPI for Neurological Research, Cologne
# using code from  Jakub T. Moscicki, 2013, CERN/IT
#
#  run on the owncloud application server:
#  php -f set-quota.php USER QUOTA
#   e.g.  php -f set-quota.php aeinstein 3g
#   e.g.  php -f set-quota.php aeinstein "3 GB"

set_include_path(get_include_path() . PATH_SEPARATOR . '/var/www/owncloud');

require_once 'lib/base.php';

$login = $argv[1];
$quota = $argv[2];

if(OC_User::userExists($login)) {
   if($quota!='none' and $quota!='default') {
       $quota = OC_Helper::computerFileSize($quota);
       $quota = OC_Helper::humanFileSize($quota);
   }

   print "setting quota of user \"".$login."\" to ".$quota."\n";
        OC_Preferences::setValue($login, 'files', 'quota', $quota);
   print "done.\n";
}
else {
   print "*** ERROR: user \"".$login."\" does not exist.\n";
}

?>

Warm regards,
 Stefan


On 28.09.2013, at 13:16, Jakub Moscicki <[hidden email]> wrote:

> Hello again,
>
> Let me share a small script that I recently wrote by analysing the API. I would appreciate if the owncloud developers could comment if this is a right approach - it works for me but it has been developed purely experimentally and maybe there are some loopholes.
>
> It creates a user account and sets up the filesystem. Just run this script on the server possibly adjusting the location of your ownloud path.
>
> I use it for creating test accounts.
>
> I hope this will be useful for you, too.
>
> kuba
>
> --
>
> create_test_user.php:
>
> <?php
>
> # Create local user account.
> #
> # Author: Jakub T. Moscicki, 2013, CERN/IT
> #
> # To be placed and run on the owncloud application server:
> #
> #  php -f create_test_user.php USER PASSWORD
> #
>
> set_include_path(get_include_path() . PATH_SEPARATOR . '/var/www/html/owncloud');
>
> require_once 'lib/base.php';
>
> $login = $argv[1];
> $password = $argv[2];
>
> if(OC_User::userExists($login)) {
>   print "user already exists:".$login."\n";
>   OC_User::setPassword($login,$password);
>   print "password overwritten\n";
> }
> else
>   {
>     print "creating user... \n";
>     OC_User::createUser($login,$password);
>     print "user created and password set:".$login."\n";
>     OC_Util::setupFS($login);
>     print "setup FS done\n";
>   }
>
> ?>
>
>
>
>
> On Sep 28, 2013, at 10:35 AM, Jakub Moscicki <[hidden email]> wrote:
>
>> Hello,
>>
>> I found this tool - I have not tested all functionality (only file upload with admin masquerading) but it also has the set_quota option:
>>
>> http://forum.owncloud.org/viewtopic.php?t=8684
>>
>> kuba
>>
>> --
>>
>> On Sep 28, 2013, at 12:18 AM, Stefan Vollmar <[hidden email]>
>>  wrote:
>>
>>> Dear CJ Keist,
>>>
>>> On 27.09.2013, at 22:28, CJ Keist <[hidden email]> wrote:
>>>
>>>> The web interface doesn't look to have the ability to list thousands of users on my owncloud system. So there is no way for me to set custom disk quotas for users that are not displayed on the web interface.  I have tried the search function on the page but that doesn't work.
>>>> So I tried to see where disk quota settings are stored on the mysql database but have not had any luck finding where that value is set per user account.  Could someone direct me on how I can set default disk quota for users on my system?
>>>
>>> I am not sure that this is the "official" way of doing things but I would suggest a different approach: if you use the MySQL backend, it seems to be pretty straightforward to set all sorts of parameters with a few lines of SQL code. In fact, this is similar to our own automated method of creating a large number of users in OwnCloud and sending automatically generated E-mails with activation links (tokens).
>>>
>>> With OwnCloud 5, you can look up user data in the oc_user table (here: "aeinstein" is the "uid" of "Albert Einstein"), you can then set a quota of 10 GB like this:
>>>
>>> INSERT INTO `oc_preferences` VALUES
>>> ('aeinstein','files','quota','10 GB');
>>>
>>> If you have a list of uids it is very easy to repeat that line as often as required.
>>>
>>> Warm regards,
>>> Stefan
>>>
>>>>
>>>>
>>>> --
>>>> C. J. Keist                     Email: [hidden email]
>>>> Systems Group Manager           Solaris 10 OS (SAI)
>>>> Engineering Network Services    Phone: 970-491-0630
>>>> College of Engineering, CSU     Fax:   970-491-5569
>>>> Ft. Collins, CO 80523-1301
>>>>
>>>> All I want is a chance to prove 'Money can't buy happiness'
>>>>
>>>> _______________________________________________
>>>> Owncloud mailing list
>>>> [hidden email]
>>>> https://mail.kde.org/mailman/listinfo/owncloud
>>>
>>> --
>>> Dr. Stefan Vollmar, Dipl.-Phys.
>>> Head of IT group
>>> Max-Planck-Institut für neurologische Forschung
>>> Gleueler Str. 50, 50931 Köln, Germany
>>> Tel.: +49-221-4726-213  FAX +49-221-4726-298
>>> Tel.: +49-221-478-5713  Mobile: 0160-93874279
>>> E-Mail: [hidden email]   http://www.nf.mpg.de
>>>
>>>
>>>
>>> _______________________________________________
>>> Owncloud mailing list
>>> [hidden email]
>>> https://mail.kde.org/mailman/listinfo/owncloud
>>
>> _______________________________________________
>> Owncloud mailing list
>> [hidden email]
>> https://mail.kde.org/mailman/listinfo/owncloud
>
> _______________________________________________
> Owncloud mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/owncloud
--
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleueler Str. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
E-Mail: [hidden email]   http://www.nf.mpg.de




_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to manage thousands of users?

Stefan Vollmar
In reply to this post by CJ Keist
Dear CJ,

On 30.09.2013, at 19:17, CJ Keist <[hidden email]> wrote:

> Could someone send me the the table structure for oc_preferneces? For some reason my database doesn't have it.


We use the MySQL backend. You can use the mysql commandline tool to take a closer look at the database:

mysql> use owncloud;
mysql> describe oc_preferences;
+-------------+-------------+------+-----+---------+-------+
| Field       | Type        | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| userid      | varchar(64) | NO   | MUL |         |       |
| appid       | varchar(32) | NO   |     |         |       |
| configkey   | varchar(64) | NO   |     |         |       |
| configvalue | longtext    | YES  |     | NULL    |       |
+-------------+-------------+------+-----+---------+-------+

However, the script of my previous mail is probably more suitable for your problem.

Warm regards,
 Stefan



On 30.09.2013, at 19:17, CJ Keist <[hidden email]> wrote:

> Could someone send me the the table structure for oc_preferneces? For some reason my database doesn't have it.
>
> On 9/27/13 4:18 PM, Stefan Vollmar wrote:
>> Dear CJ Keist,
>>
>> On 27.09.2013, at 22:28, CJ Keist <[hidden email]> wrote:
>>
>>> The web interface doesn't look to have the ability to list thousands of users on my owncloud system. So there is no way for me to set custom disk quotas for users that are not displayed on the web interface.  I have tried the search function on the page but that doesn't work.
>>> So I tried to see where disk quota settings are stored on the mysql database but have not had any luck finding where that value is set per user account.  Could someone direct me on how I can set default disk quota for users on my system?
>>
>> I am not sure that this is the "official" way of doing things but I would suggest a different approach: if you use the MySQL backend, it seems to be pretty straightforward to set all sorts of parameters with a few lines of SQL code. In fact, this is similar to our own automated method of creating a large number of users in OwnCloud and sending automatically generated E-mails with activation links (tokens).
>>
>> With OwnCloud 5, you can look up user data in the oc_user table (here: "aeinstein" is the "uid" of "Albert Einstein"), you can then set a quota of 10 GB like this:
>>
>> INSERT INTO `oc_preferences` VALUES
>>  ('aeinstein','files','quota','10 GB');
>>
>> If you have a list of uids it is very easy to repeat that line as often as required.
>>
>> Warm regards,
>>  Stefan
>>
>>>
>>>
>>> --
>>> C. J. Keist                     Email: [hidden email]
>>> Systems Group Manager           Solaris 10 OS (SAI)
>>> Engineering Network Services    Phone: 970-491-0630
>>> College of Engineering, CSU     Fax:   970-491-5569
>>> Ft. Collins, CO 80523-1301
>>>
>>> All I want is a chance to prove 'Money can't buy happiness'
>>>
>>> _______________________________________________
>>> Owncloud mailing list
>>> [hidden email]
>>> https://mail.kde.org/mailman/listinfo/owncloud
>>
>
> --
> C. J. Keist                     Email: [hidden email]
> Systems Group Manager           Solaris 10 OS (SAI)
> Engineering Network Services    Phone: 970-491-0630
> College of Engineering, CSU     Fax:   970-491-5569
> Ft. Collins, CO 80523-1301
>
> All I want is a chance to prove 'Money can't buy happiness'
--
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleueler Str. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
E-Mail: [hidden email]   http://www.nf.mpg.de




_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to manage thousands of users?

CJ Keist
Stefan,
    Thank you very much for this and your script!

On 9/30/13 3:55 PM, Stefan Vollmar wrote:

> Dear CJ,
>
> On 30.09.2013, at 19:17, CJ Keist <[hidden email]> wrote:
>
>> Could someone send me the the table structure for oc_preferneces? For some reason my database doesn't have it.
>
> We use the MySQL backend. You can use the mysql commandline tool to take a closer look at the database:
>
> mysql> use owncloud;
> mysql> describe oc_preferences;
> +-------------+-------------+------+-----+---------+-------+
> | Field       | Type        | Null | Key | Default | Extra |
> +-------------+-------------+------+-----+---------+-------+
> | userid      | varchar(64) | NO   | MUL |         |       |
> | appid       | varchar(32) | NO   |     |         |       |
> | configkey   | varchar(64) | NO   |     |         |       |
> | configvalue | longtext    | YES  |     | NULL    |       |
> +-------------+-------------+------+-----+---------+-------+
>
> However, the script of my previous mail is probably more suitable for your problem.
>
> Warm regards,
>   Stefan
>
>
>
> On 30.09.2013, at 19:17, CJ Keist <[hidden email]> wrote:
>
>> Could someone send me the the table structure for oc_preferneces? For some reason my database doesn't have it.
>>
>> On 9/27/13 4:18 PM, Stefan Vollmar wrote:
>>> Dear CJ Keist,
>>>
>>> On 27.09.2013, at 22:28, CJ Keist <[hidden email]> wrote:
>>>
>>>> The web interface doesn't look to have the ability to list thousands of users on my owncloud system. So there is no way for me to set custom disk quotas for users that are not displayed on the web interface.  I have tried the search function on the page but that doesn't work.
>>>> So I tried to see where disk quota settings are stored on the mysql database but have not had any luck finding where that value is set per user account.  Could someone direct me on how I can set default disk quota for users on my system?
>>> I am not sure that this is the "official" way of doing things but I would suggest a different approach: if you use the MySQL backend, it seems to be pretty straightforward to set all sorts of parameters with a few lines of SQL code. In fact, this is similar to our own automated method of creating a large number of users in OwnCloud and sending automatically generated E-mails with activation links (tokens).
>>>
>>> With OwnCloud 5, you can look up user data in the oc_user table (here: "aeinstein" is the "uid" of "Albert Einstein"), you can then set a quota of 10 GB like this:
>>>
>>> INSERT INTO `oc_preferences` VALUES
>>>   ('aeinstein','files','quota','10 GB');
>>>
>>> If you have a list of uids it is very easy to repeat that line as often as required.
>>>
>>> Warm regards,
>>>   Stefan
>>>
>>>>
>>>> --
>>>> C. J. Keist                     Email: [hidden email]
>>>> Systems Group Manager           Solaris 10 OS (SAI)
>>>> Engineering Network Services    Phone: 970-491-0630
>>>> College of Engineering, CSU     Fax:   970-491-5569
>>>> Ft. Collins, CO 80523-1301
>>>>
>>>> All I want is a chance to prove 'Money can't buy happiness'
>>>>
>>>> _______________________________________________
>>>> Owncloud mailing list
>>>> [hidden email]
>>>> https://mail.kde.org/mailman/listinfo/owncloud
>> --
>> C. J. Keist                     Email: [hidden email]
>> Systems Group Manager           Solaris 10 OS (SAI)
>> Engineering Network Services    Phone: 970-491-0630
>> College of Engineering, CSU     Fax:   970-491-5569
>> Ft. Collins, CO 80523-1301
>>
>> All I want is a chance to prove 'Money can't buy happiness'

--
C. J. Keist                     Email: [hidden email]
Systems Group Manager           Solaris 10 OS (SAI)
Engineering Network Services    Phone: 970-491-0630
College of Engineering, CSU     Fax:   970-491-5569
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'

_______________________________________________
Owncloud mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/owncloud