FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 02-23-2010, 03:16 PM
Rudi Ahlers
 
Default how to show only quota limit to users via SSH?

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 ?


--
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
 
Old 02-23-2010, 07:01 PM
Dave
 
Default how to show only quota limit to users via SSH?

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

?
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-23-2010, 09:31 PM
Kai Schaetzl
 
Default how to show only quota limit to users via SSH?

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



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-24-2010, 07:25 AM
Rudi Ahlers
 
Default how to show only quota limit to users via SSH?

On Wed, Feb 24, 2010 at 12:31 AM, Kai Schaetzl <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
 
Old 02-24-2010, 07:29 AM
Georghy
 
Default how to show only quota limit to users via SSH?

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

--
Cordialement, / Greetings,
Georghy FUSCO

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-24-2010, 07:55 AM
Rudi Ahlers
 
Default how to show only quota limit to users via 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.*




--
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
 
Old 02-24-2010, 09:31 AM
Kai Schaetzl
 
Default how to show only quota limit to users via SSH?

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

--
Get your web at Conactive Internet Services: http://www.conactive.com



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-24-2010, 09:54 AM
Rudi Ahlers
 
Default how to show only quota limit to users via SSH?

On Wed, Feb 24, 2010 at 12:31 PM, Kai Schaetzl <maillists@conactive.com> wrote:


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?


--
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
 
Old 02-24-2010, 10:31 AM
Kai Schaetzl
 
Default how to show only quota limit to users via SSH?

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

--
Get your web at Conactive Internet Services: http://www.conactive.com



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-24-2010, 10:41 AM
Rudi Ahlers
 
Default how to show only quota limit to users via SSH?

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?


--
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
 

Thread Tools




All times are GMT. The time now is 12:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org