|
I see several possibilities here so let me take them one at a time.
1 ) Limit access to non-OS commands for a given user
You could create a directory anywhere on the system (perhaps in a "bin" subdirectory from the user's home) where commands -- compiled or script -- could be stored. Those commands could then be owned by that user and be executable only by that ID. Simply add the directory to the user's PATH environment variable.
2 ) Create a alias for a given command
This is useful when you have a particularly complicated command perhaps with many options. By using alias(1) in the user's profile, you can simplify any command. One that was standard twenty years ago when I first did this is college was:
alias la="/bin/ls -la"
3 ) I'm making this way too hard and you want the user to execute some admin commands such as df(1M)
Just add /usr/sbin to the user's PATH.
|