Controlling Access to Your Scripts
A lot of the scripts that you create might be just for yourself or your co-workers. Or, they might be for general distribution to the public. In all of these cases, you might not need to worry about having any kind of access control on your scripts.
But, there might also be times when you need to create scripts that only certain people can access. The methods that you can use for this include:
- Assigning
sudo
privileges - Assigning an Access Control List
- Obfuscating plain-text scripts
We’ll begin by looking using sudo
.
Assigning sudo Privileges
sudo
is a handy security feature that is installed by default on macOS, OpenIndiana and most Linux distros. It’s also available for installation on most BSD-type distros and any Linux distros on which it isn’t installed by default. The most common way to use sudo
is to allow non-privileged users to run programs with root user privileges. (You can...