Author Topic: Cant create new users because quota  (Read 4179 times)

rafaelmbaez

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Cant create new users because quota
« on: May 28, 2012, 01:19:59 pm »
When I create a user, it says:

Cannot set quota to 0....

The user is created, but I cant access it in my computers domain. But old users have no problem to access it. Its crazy

I need a fix ASAP, cant understand why this is happening, never had quotas activated, and I think its because an update.

I think Zentyal is a really good software, but instead of put more improvements, it should be much more stable.

Please help

rafaelmbaez

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Cant create new users because quota
« Reply #1 on: May 28, 2012, 02:09:38 pm »
I think this is update that broke my system.

http://lists.zentyal.org/pipermail/zentyal-commits/2012-April/005950.html

Can I disable it? Can I revert it? I cant work, I cant add users!!!

this is mad

jjmontes

  • Zentyal Staff
  • Zen Monk
  • *****
  • Posts: 86
  • Karma: +8/-0
    • View Profile
Re: Cant create new users because quota
« Reply #2 on: May 29, 2012, 02:52:18 am »
Hello Rafael.

I have just tested this and I cannot reproduce the error you mention. I have created several users with different default quota values (including 0), and also changed user quotas to different values.

If you can reproduce this it would be nice if you could add some more information. Please also test this on a clean system (i.e. in a virtual machine), in order to rule out any possible custom changes you have made to your system.

robb

  • Guest
Re: Cant create new users because quota
« Reply #3 on: May 29, 2012, 04:37:13 am »
Rafael, how many users do you have?

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: Cant create new users because quota
« Reply #4 on: May 29, 2012, 04:25:50 pm »
Hello Rafael,

in order to help us with this could you execute the following command and pot the output here:

Quote
sudo /usr/zentyal-useruser-quota -q UID

If you don't know the uidnumber of your user you could get it using the 'uid' command. For example:
Quote
jag@zapp:/tmp$ id jag
uid=1000(jag) gid=1000(jag) groups=1000(jag),4(adm),20(dialout),24(cdrom),27(sudo),46(plugdev),110(lpadmin),111(sambashare),112(admin)

In this case the user 'jag'  uid number is 1000.

Let us know what you find

nicduff

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Cant create new users because quota
« Reply #5 on: May 30, 2012, 05:40:43 pm »
I have the same error

My setup it 1Master/3Slave

and the error make other error

Quote
/usr/share/zentyal-users/user-quota -q 2059
-1
« Last Edit: May 30, 2012, 05:49:52 pm by nicduff »

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: Cant create new users because quota
« Reply #6 on: May 31, 2012, 04:50:39 pm »
Probably te quota themservles are not working correctly.

Before the upgrade the quotes worked?. By worked I mean that if you exceeded quota the filesystem denied the writing of more data. I do NOT mean wether you could set the quota field value, before the upgrade we have less checks so it detects more errors now.

A thing that could make the quota misswork would be to have strange permissions in the /home directory. Could you paste the output of the command  'ls -ld /home'?


psauxw

  • Zen Apprentice
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Cant create new users because quota
« Reply #7 on: June 04, 2012, 04:25:41 pm »
I have the same problem

"sudo /usr/zentyal-useruser-quota -q UID" returns
-1
"ls -ld /home" returns
drwxr-xr-x 29 root root 4096 2012-06-04 10:15 /home

I was gonna put users in the domain but I can't log into it with a test user.  I can, however, put the computer in the domain with the admin login but after a reboot of the windows box I can't log with the same user and password.  It always says "invalid password".

Any help is greatly appreciated! Thanks for your time.

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: Cant create new users because quota
« Reply #8 on: June 04, 2012, 04:32:43 pm »
"sudo /usr/zentyal-useruser-quota -q UID"

You need to replace 'UID' with the UID number of your user, otherwise it would always return -1 . You can get the uid number with the command 'id USER_NAME'.

The permissions of /home are correct so this is not the problem

psauxw

  • Zen Apprentice
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Cant create new users because quota
« Reply #9 on: June 04, 2012, 04:38:15 pm »
thats what i did for the UID btw. I just dont wanna put the username on here.

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: Cant create new users because quota
« Reply #10 on: June 04, 2012, 05:09:16 pm »
Ok, could you run 'sudo quotestats'? . I am convinced that is a problem of the quota system itself but I don't yet know what exact problem is it.

psauxw

  • Zen Apprentice
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Cant create new users because quota
« Reply #11 on: June 04, 2012, 05:10:48 pm »
root@zentyal:/var/log/zentyal# quotastats
Kernel quota version: 6.5.1
Number of dquot lookups: 2967167
Number of dquot drops: 2966061
Number of dquot reads: 42
Number of dquot writes: 166
Number of quotafile syncs: 80
Number of dquot cache hits: 2966978
Number of allocated dquots: 42
Number of free dquots: 10
Number of in use dquot entries (user/group): 32

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: Cant create new users because quota
« Reply #12 on: June 04, 2012, 05:12:44 pm »
Thanks for you quick answer. This output seems correct.

Maybe it could be how the mount points are set up in the system? The output of this two commands could be useful to check this theory:

- mount
- ls /home /

psauxw

  • Zen Apprentice
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Cant create new users because quota
« Reply #13 on: June 04, 2012, 05:17:21 pm »
yeah the homes are mounted from a NAS
/xxxx on /home type nfs (rw,nolock,addr=xxx.xxx.xxx.xxx)  (modified output for names and ip)

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: Cant create new users because quota
« Reply #14 on: June 04, 2012, 05:29:51 pm »
You have the aquota.group and aquota.user files either in / or /home?.

Anyway until it is fixed I provide you a version with the check disabled. Use it to replace /usr/share/perl5/EBox/UsersAndGroups.pm and then execute 'sudo /etc/init.d/zentyal apache restart' then create your users. However the quotas would not work, regardless of what will be shown in the interface.