Re: I'm looking for "Virtual dummy shell" in linux?

From: Basile Starynkevitch [news] (basile-news_at_starynkevitch.net)
Date: 08/21/05


Date: Sun, 21 Aug 2005 18:32:53 +0000 (UTC)

On 2005-08-21, somez72 <somez72@hansfos.com> wrote:
> Hi,
> I'm looking for this kind of shell.
> I'll call this shell "Virtual dummy shell".
>
> Namely, When someone logined to linux box... this "Virtual dummy shell" will
> be invoked and reuturn some result to user according to command user issued.
>
> Conditions for this "Virtual dummy shell" is
>
> 1) after login in this "Virtual dummy shell" , give user root authority
> and acts as root user.
> 2) but don't influence to real root file system and system environment.

I don't think it has any real sense (or I don't understand your
question), since a shell is used to invoke commands (ie executable
programs which are not builtin!), and these commands do arbitrary
things, usually thru system calls (e.g. by using the glibc library).

So things has to be done at library (or system call) level, not only
at the shell level.

> Have ever someone seen this kind of dummy shell in linux?

The fakeroot command does something similar, by mascarading the low
level functions of the C library. From its man page (on Debian/Sid)

DESCRIPTION

       fakeroot runs a command in an environment wherein it appears to
       have root privileges for file manipulation. This is useful for
       allowing users to create archives (tar, ar, .deb etc.) with
       files in them with root permissions/ownership. Without
       fakeroot one would need to have root privileges to create the
       constituent files of the archives with the correct permissions
       and ownership, and then pack them up, or one would have to
       construct the archives directly, without using the archiver.

       [...]

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile(at)starynkevitch(dot)net 
8, rue de la Faïencerie, 92340 Bourg La Reine, France


Relevant Pages

  • Bash-4.0 available for FTP
    ... Unlike previous bash distributions, this tar file includes the formatted ... The shell has been changed to be more ... rigorous about parsing commands inside command substitutions, ... Changes have been made to the Readline library being released at ...
    (gnu.announce)
  • Why newbies dont RTFM...
    ... Even though I've used Linux before, I've never had to do any ... BASH BUILTIN COMMANDS ... last command exited within ... unless the shell is not exeâ ...
    (comp.os.linux.misc)
  • Re: Great SWT Program
    ... None of the nasty things that you have said or implied about me are at ... treat the file as input (manually invoking the command interpreter ... script, copy the line into that within the editor, exit, and invoke ... the shell script. ...
    (comp.lang.java.programmer)
  • Re: ksh silently ignores function if mistakenly not autoloaded
    ... Here's the order of execution. ... This really takes place prior to command ... Shell scripts, with all their power, have one major drawback - they ... In the Korn Shell, there are two separate syntaxes for defining ...
    (comp.unix.shell)
  • Re: Shell function - accessing an Access secure db (.MDW file)
    ... > Hi - Does anyone know the correct syntax for the shell function. ... You can use the Shell command. ... To execute internal DOS command (Dir, Copy, ... Private Declare Function OpenProcess _ ...
    (microsoft.public.vb.general.discussion)