0

Is there a way to lock down an account to when it logs in, it runs a specific command/script and then exits after the action is completed, while keeping it locked out of performing any additional operations if it happens to break out of it's script/command?

Would prefer a native way of accomplishing this, but not necessary.

1

1 Answer 1

0

The old school way to handle this is execing your code from the user's .profile. By using exec it will replace the login shell. So if the user manages to break out there isn't a shell for them to escape back to. When your login process exits Linux kills the session.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .