Re: Quota problems with nummeric Usernames



On 27Apr2007 09:55, G?tz Reinicke <goetz.reinicke@xxxxxxxxxxxxxxx> wrote:
| we run several Redhat Linux servers and recently we noticed, that some
| of our users do have a problem with their quota.
|
| We changed our policy for the students username to be their registration
| number; e.g. 0306025. We create the accounts and set the quota by the
| tool webmin (www.webmin.com), which uses setquota for handling quotas.

I think this is your problem. Numeric user names are generally a bad idea
bad many contexts will accept a login _or_ a uid, and they distinguish by
seeing if it looks numeric.

Better still, your leading zero can confuse some programs into treating the
apparent "uid" as basic 8 (octal) if they're carelss with their choice of
"read this number" function.

Can I recommend that you shift to putting a leading letter on your
logins, eg "s0306025".

[...]
| For users having unlimited space, I can't set the quota from within
| webmin, but doing an edquota, the quota shows 0 blocks used even if
| there is space used and the soft and hard limits are set to the limit I
| set by webmin.
| An other strange thing is, that the edquota command shows a strange uid
| which isn't the same as in the /etc/passwd-file.
[...]

Looking at "man edquota":

One or more users or groups may be speci- fied on the command line.
If a number is given in the place of user/group name it is
treated as an UID/GID.

That's going to cause you trouble right there.

| repquota -a|grep 0306025
| 0306025 -- 242144 307200 665600 106 0 0
| edquota 0306025
| Disk quotas for user 0306025 (uid 101397):
| Filesystem blocks soft hard inodes soft hard
| /dev/sda6 0 0 0 0 0 0
|
| grep 0306025 /etc/passwd
| 0306025:x:787:503:Amelie Kuester:/home/studenten/0306025:/sbin/nologin
|
| after doing
| setquota -u 0306025 102411 204811 600 610 -a
[...]
| Any ideas?

Does:

repquota -an | egrep '(306025|787|101397)'

Show anything interesting? 787 is 0306025's uid. 101397 is 306025
interpreted as an octal number (which a leading zero will do for some
conversion functions).

Cheers,
--
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

When I finally kick the bucket I'll probably crawl out of my grave every few
days just to check my mail..... - Peter Gutmann <pgut1@xxxxxxxxxxxxxxx>

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: Automatically assigning user quotas
    ... I think that option '-p' of 'edquota' will be useful in this case. ... manually set quota for some user and later use that option to copy quota ... Ryan Golhar wrote: ... > don't want to have to manually set their quota. ...
    (RedHat)
  • Re: Default quota?
    ... Ashley M. Kirchner wrote: ... > How do I set a default quota value on a system such that when ... Right now I have to run edquota on each new user added to ...
    (Fedora)
  • Quota problems with nummeric Usernames
    ... of our users do have a problem with their quota. ... that the edquota command shows a strange uid ... Filesystem blocks soft hard inodes soft hard ...
    (RedHat)
  • Re: Automatically assigning user quotas
    ... On May 30, 2004 08:43 pm, Ryan Golhar wrote: ... > Is there a way to automatically set a user quota without running ... > don't want to have to manually set their quota. ... 'man edquota', have a look at the -p option. ...
    (RedHat)
  • Re: Quota support, kernel move from 2.2 to 2.4
    ... question specifically the aquota files do not contain any quota info ... Disk quotas for user template (uid 502): ...
    (alt.os.linux)