RSH

I’m using rsh from windows to run command on QNX4 box, but I can’t get the commands to run in the “normal” environment of the user. The .profile isn’t processed nor is /etc/profile. Is it possible to acheive that?

  • Mario

In this case, rsh will start a shell to execute your commands. It is not a normal login, so the .profile, etc won’t get executed.

There are dot files that do get executed when a new shell is started, depending on the shell you use. eg: I am using bash and I have a .bashrc file in my home dir. It gets executed every time a shell is open (xterm, pterm) even though no login is involved. I just tried and .bashrc did get run when I rsh to run command.

Thanks noc. I’m using ksh and I couldn’t find any file that gets executed/loaded like bash does. I’m have a look at switching shell ;-0

Is RSH stands for Restricted or Remote SHell?
If it is restricted, where did you get one?

rsh is remote shell, not restricted.

I am using bash, and it provides restricted shell options. If you run “bash -r”, or call it “rbash” (ln -s bash rbash), it will run in restricted mode.

What is the version of your bash?
I’ve found a v2.02 ported, however the bash itself is (or rather was when I looked for it) v3.xx already.
I could not port the v3.xx, could you?

I never ported bash. I think mine was downloaded from JC’s website.

How about using esh -r (embedded shell)

Yes, mario, the -r switch restricts esh.
But how can I make it someone’s passwd shell? I mean - in the restricted mode at once?

Digging in my rusty old safe I’ve found a diskette from the QUICS era…
There is a mystical thingy resh, which is a restricted shell too.
It just starts in restricted mode…
The problem remains as I cannot chroot-jail a user.

There is a rssh, but it depends on wordexp(), which is not that easily ported to QNX4…
:frowning:

Securing QNX4 is highly non-trivial task!

“Securing QNX4 is highly non-trivial task”

I can imagine. It’s like trying to make a strainner water tight.