Hi,
How, if possible, do I only show a user's quota limits when he logs into SSH?
For example, I set a soft limit of 10GB on this user, but when he logs in he can see all the limits:
-sh-3.2$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/fluid01-root 38G 36G 530M 99% / /dev/mapper/fluid01-home 48G 15G 30G 34% /home /dev/md0 190M 33M 148M 19% /boot tmpfs 881M 0 881M 0% /dev/shm /dev/mapper/fluid01-cpbackup 203G 184G 9.4G 96% /cpbackup -sh-3.2$
Is it possible to show him only his limits, and for that matter mounted partitions, which in this case is /cpbackup/knocky ?
On Tue, Feb 23, 2010 at 6:16 AM, Rudi Ahlers Rudi@softdux.com wrote:
Hi,
How, if possible, do I only show a user's quota limits when he logs into SSH?
quota -vls
?
Rudi Ahlers wrote on Tue, 23 Feb 2010 18:16:23 +0200:
For example, I set a soft limit of 10GB on this user, but when he logs in he can see all the limits:
These are not limits, this is a program he can run. Your question sounds like you want to show a certain result (quota) when the user logs in. But that doesn't seem to be what you want. What you likely want is give users a limited shell. Google for "limited shell", "restricted shell" and "jail".
Kai
On Wed, Feb 24, 2010 at 12:31 AM, Kai Schaetzl maillists@conactive.comwrote:
Rudi Ahlers wrote on Tue, 23 Feb 2010 18:16:23 +0200:
For example, I set a soft limit of 10GB on this user, but when he logs in
he
can see all the limits:
These are not limits, this is a program he can run. Your question sounds like you want to show a certain result (quota) when the user logs in. But that doesn't seem to be what you want. What you likely want is give users a limited shell. Google for "limited shell", "restricted shell" and "jail".
Kai
-- Get your web at Conactive Internet Services: http://www.conactive.com
Hi Kai,
I know what the limits are, and that the program he runs is not related to the limits.
Let me re-phrase :)
Is it possible, with CentOS (or Linux), to allow a user to only see his file quotas (user quotas) when he logs in via SSH, instead of the whole server's disk space?
i.e. when the user logs in, and types df -h, I want him to see something like this:
root@knocky:[~]$ df -h Filesystem Size Used Avail Use% Mounted on /cpbackup 20G 15G 4.6G 77% / root@knocky:[~]$
Is this possible?
Rudi Ahlers a écrit :
On Wed, Feb 24, 2010 at 12:31 AM, Kai Schaetzl <maillists@conactive.com mailto:maillists@conactive.com> wrote:
Rudi Ahlers wrote on Tue, 23 Feb 2010 18:16:23 +0200: > For example, I set a soft limit of 10GB on this user, but when he logs in he > can see all the limits: These are not limits, this is a program he can run. Your question sounds like you want to show a certain result (quota) when the user logs in. But that doesn't seem to be what you want. What you likely want is give users a limited shell. Google for "limited shell", "restricted shell" and "jail". Kai -- Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________
Hi Kai,
I know what the limits are, and that the program he runs is not related to the limits.
Let me re-phrase :)
Is it possible, with CentOS (or Linux), to allow a user to only see his file quotas (user quotas) when he logs in via SSH, instead of the whole server's disk space?
i.e. when the user logs in, and types df -h, I want him to see something like this:
root@knocky:[~]$ df -h Filesystem Size Used Avail Use% Mounted on /cpbackup 20G 15G 4.6G 77% / root@knocky:[~]$
Is this possible?
-- Kind Regards Rudi Ahlers SoftDux
Website: http://www.SoftDux.com Technical Blog: http://Blog.SoftDux.com Office: 087 805 9573 Cell: 082 554 7532
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
try to add "df -h" (without quotes) in user/.bashrc but it will show to the user quotas even if he is connected via terminal instead of ssh
On Wed, Feb 24, 2010 at 10:29 AM, Georghy fusco@wanagain.net wrote:
try to add "df -h" (without quotes) in user/.bashrc but it will show to the user quotas even if he is connected via terminal instead of ssh
-- Cordialement, / Greetings, Georghy FUSCO
Gregory, it will still show the user the whole server's disk usage, and not his own file quotas. Only difference is that it does it automatically @ login.
And I don't want to limit the shell either.
Rudi Ahlers wrote on Wed, 24 Feb 2010 10:55:02 +0200:
Gregory, it will still show the user the whole server's disk usage, and not his own file quotas. Only difference is that it does it automatically @ login.
Dave has already given you this answer I think. You are using the wrong command.
Kai
On Wed, Feb 24, 2010 at 12:31 PM, Kai Schaetzl maillists@conactive.comwrote:
Dave has already given you this answer I think. You are using the wrong command.
Kai
--
Kai, so are you saying I should replace "df -h" with "quota -vls" ?
OR should I completely un-install df?
Rudi Ahlers wrote on Wed, 24 Feb 2010 12:54:18 +0200:
Kai, so are you saying I should replace "df -h" with "quota -vls" ?
OR should I completely un-install df?
df does not show quota. quota shows quota. And if you do not want to have the user access to a certain program you have to remove it or prohibit access otherwise (-> restricted shell).
Kai
On Wed, Feb 24, 2010 at 1:31 PM, Kai Schaetzl maillists@conactive.comwrote:
df does not show quota. quota shows quota. And if you do not want to have the user access to a certain program you have to remove it or prohibit access otherwise (-> restricted shell).
Kai
--
Kai, don't take this the wrong way, but I can see this is going nowhere.
When Bob logs into the server, via SSH, I want him to see how much space he has left. The server uses quotas to limit the user's space, and "df -h" only shows the whole server's disk usage, not the users. Is it possible, with df to show the user's disk usage, or not?
2010/2/24 Rudi Ahlers rudiahlers@gmail.com:
On Wed, Feb 24, 2010 at 1:31 PM, Kai Schaetzl maillists@conactive.com wrote:
df does not show quota. quota shows quota. And if you do not want to have the user access to a certain program you have to remove it or prohibit access otherwise (-> restricted shell).
Kai
--
Kai, don't take this the wrong way, but I can see this is going nowhere. When Bob logs into the server, via SSH, I want him to see how much space he has left. The server uses quotas to limit the user's space, and "df -h" only shows the whole server's disk usage, not the users. Is it possible, with df to show the user's disk usage, or not?
Yes, code your own df utility, but without secure limits to shell or kernel people can get full information on other ways...
-- Eero
Rudi Ahlers sent a missive on 2010-02-24:
On Wed, Feb 24, 2010 at 1:31 PM, Kai Schaetzl maillists@conactive.com wrote:
df does not show quota.
quota shows quota. And if you do not want to have the user
access to a
certain program you have to remove it or prohibit access otherwise (-> restricted shell).
Kai
--
Kai, don't take this the wrong way, but I can see this is going nowhere.
When Bob logs into the server, via SSH, I want him to see how much space he has left. The server uses quotas to limit the user's space, and "df -h" only shows the whole server's disk usage, not the users. Is it possible, with df to show the user's disk usage, or not?
No it is not possible to do this with df.
df is not able to show user quotas nor is it possible to limit it to display only the user space available.
Perhaps if you were to create a partition specifically for the user then you could allow them to use df.
Greetings,
On Wed, Feb 24, 2010 at 5:30 PM, Simon Billis simon@houxou.com wrote:
Is it possible, with df to show the user's disk usage, or not?
No it is not possible to do this with df.
du -sh /home/user, perhaps may help.
Regards
Rajagopal
Rajagopal Swaminathan sent a missive on 2010-02-24:
Greetings,
On Wed, Feb 24, 2010 at 5:30 PM, Simon Billis simon@houxou.com wrote:
Is it possible, with df to show the user's disk usage, or not?
No it is not possible to do this with df.
du -sh /home/user, perhaps may help.
Regards
Rajagopal
Good idea :-)... however, the user would still be able to run df -h unless the shell was restricted.
On Wed, Feb 24, 2010 at 2:00 PM, Simon Billis simon@houxou.com wrote:
No it is not possible to do this with df.
df is not able to show user quotas nor is it possible to limit it to display only the user space available.
Perhaps if you were to create a partition specifically for the user then you could allow them to use df.
Thanx :)
Your suggestion is probably not a bad idea though, to have an LVM for each user, instead of relying on file quotas. But that would probably have some performance impact then?
I'll test it our in any case
Rudi Ahlers wrote on Wed, 24 Feb 2010 13:41:38 +0200:
Is it possible, with df to show the user's disk usage, or not?
No, no and no again. I told this already several times. I'm at a loss why you didn't get it.
Kai
From: Rudi Ahlers rudiahlers@gmail.com
Gregory, it will still show the user the whole server's disk usage, and not his own file quotas. Only difference is that it does it automatically @ login. And I don't want to limit the shell either.
You could just put an alias in their.bashrc... alias df="/path/to/myowndf" Put anything you want in myowndf script/program, like quota -vls... Of course, they could bypass the alias if they really wanted to but... is that really a problem?
JD