Is it possible to restrict the user from changing some set of environment variables?
I have have a script that sets PATH to point at a specific build of some software, and puts the user in a new bash session. I'm wondering if it's possible to make PATH (and a handful of other variables) unchangeable for that session of bash, forcing them to exit if they'd like to start changing the parts of their environment that would affect how the software runs.
Answer
This will do what you want:
readonly PATH
No comments:
Post a Comment