Unix: What is the best way to get script (typescript) to work with a restricted shell?
-
I have a scenario where I want to log every activity for a particular user. I have a script built around the script command which I invoke from the user's .profile. Now the requirement is that the user should not be able to delete the subsequent typescript file that is created. Towards that, I've created a user with the default shell of rksh and put a restriction on commands that can wipe the file out. But the problem is that when I login with that user, if I call the script with the script command, the forked shell is always sh and not rksh. I know that if SHELL is not set, then the forked shell will be /bin/sh by default, but I have SHELL setup properly. How do I ensure that the forked shell is rksh only? If I comment out the call to the logger from .profile, then I get a rksh shell. But even then if I manually issue the script command, it launches sh.
-
Answer:
I guess you need to set default shell for your user as rksh. You can do this while adding a user using -s option which is for setting a default shell for that user.
Vishwajit Paste at Quora Visit the source
Related Q & A:
- What is the best way to get a job on cruise ships without spending money?Best solution by cruiseserver.net
- What's the best way to get a job in a restaurant?Best solution by Yahoo! Answers
- What's the best way to get smudges off of a plasma?Best solution by Yahoo! Answers
- What is the best way to get a job in communications?Best solution by Quora
- What is the best way to get a scholarship for Stanford?Best solution by scholarshipsservice.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.