[96493] in RedHat Linux List

home help back first fref pref prev next nref lref last post

RE: Virtualising a Linux system

daemon@ATHENA.MIT.EDU (Mike Johnson)
Tue Oct 27 14:14:17 1998

Date: Tue, 27 Oct 1998 13:18:38 -0500
To: redhat-list@redhat.com
From: Mike Johnson <Mike.Johnson@GSC.GTE.Com>
In-Reply-To: <000501be00ad$813db640$08f031ca@zeus.expio.co.nz>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

At 07:54 PM 10/26/98 +1300, you wrote:

I didn't respond earlier, because I didn't think I had anything useful
to say, but I've got a couple ideas...

>Hey thanks, that works great!
>
>Next question :)
>
>a) how can I stop users from seeing other users' processes with
>the 'ps aux' command? They must still be able to see their own
>processes, however.

Recompile 'ps' to not accept the 'a' argument.  Or, replace 'ps'
with a different utility to look into the process list (risky).  Or,
keep the original 'ps', but install a different 'ps' that doesn't
obey the 'a' in a different directory that comes before the location
of the real 'ps' in the users' search path (probably safest and best,
though someone that knows what they're doing can defeat this by changing
their path statement).

>b) how can I make it so that when a user logs in with their shell
>account and runs a command like 'uname -n' (which prints the
>current hostname), it prints their own domain name? E.g. if we're
>hosting their domain name "foo.com", I want them to see "foo.com"
>as their hostname in the shell.

Again, recompile 'uname'.  Have it check their login and look into
a hash table to see what their domain name is, then spit that out.

>Look forward to a response.

I'm not sure those were the answers you were looking for, but they
should work.  Be careful, though, since startup scripts use 'uname'
and 'ps', so you don't want to break them.  Another alternative is
to create a -huge- chroot environment for each domain you host.  As
an aside, why are you allowing shell access?

>Simon Garner.

Mike

--
Mike Johnson - mike.johnson@gsc.gte.com
Network Engineer - Prototype Development
GTE Government Systems - All opinions are mine, not GTE's.


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post