Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a script which we can pass as an argument to the pbrun command.


Login: test1
Passwd: xxxxxxx

Welcome to Solaris 10 gcmsys01

$ pbrun sysadmins safeksh

Here sysadmins is the group-name and safeksh is a script which will disable any harmful commands like rm, init 6, format etc etc., similarly, there should be a fullksh script which will allow full shell access to the server (can execute any root commands without any restriction). This script is to overcome any unwanted outages due to some harmful commands.

Any suggestions are highly appreciated.

share|improve this question
You can't really disable harmful commands, because most commands can be harmful if applied to the wrong object (e.g. echo bad >/dev/w0d0 (or whatever a disk device is called under Solaris)). You need to allow only the commands that you consider safe. Which commands do you want to allow? – Gilles Dec 26 '11 at 22:52

You should acquire `rssh', the restricted shell You can follow the restriction guides mentioned above, they're all rather self-explanatory, and simple to follow. implement terminal options.see here for restricted shell and for more option see this thread in stackoverflow

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.