![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Running a queued set of commands? | jjinno | Shell Programming and Scripting | 1 | 04-25-2008 03:27 AM |
| Running UNIX Commands from C | zainab | High Level Programming | 2 | 04-14-2008 11:35 PM |
| Running services, how to disable some? | empty | UNIX for Dummies Questions & Answers | 2 | 03-19-2008 07:33 PM |
| running commands from outside of bash | rakabarp | Shell Programming and Scripting | 3 | 03-13-2008 06:40 AM |
| running commands from script | owijust | Shell Programming and Scripting | 2 | 01-09-2006 06:12 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to disable running commands from vi
Hello,
We have a requirement to disable running shell commands via vi using "!". Can anybody please suggest how to disable this option. The requirement arises because we open up a xterm window with a config file in vi mode for the customer to edit. After the customer edits the config file he uses :wq to quit out of it. But he can also get a shell prompt by using "!" and run shell commands. We would like to restrict customers to just editing the config file. Any ideas on how to accomplish this would be great. Regards, Umesh S Sharoff |
|
||||
|
Some versions of vi support a -S option for safe mode. nvi does this for example.
Is this because you have users running under SUDO? Most vi implementation do not have safe mode (which is not completely safe because users can get around an alias like alias vi="vi -s"). In this case consider a chroot jail, which is probably the best solution. example: http://www.onlamp.com/pub/a/bsd/2003/01/23/chroot.html |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|