How to "lock" an user in it's login profile.

Latest response

Hello,

We want an user to answer a question while still in it's login profile and then run a command with the answer as part of the argument.

Whether using csh, bash, or ksh shell the user should be unable to interrupt the profile to drop to the shell.

Once the command has finished the user will be logged of automatically.

=======================================

for bash I think of this solution for the question and logoff in .bashrc

echo "question?"
read answer

command $answer
exit

=====================================
For ksh I guess I can do the same in .profile

=======================================
For csh I do not know yet


Still wondering how to avoid an interrupt, crtl+c to break out of the profile.

I do not want to use /etc/profile or /etc/bashrc for a batch user is not allowed to run "command", but interactive users must use "command"

Kind regards,

Jan Gerrit Kootstra

Responses