computersavvy |
05-19-2022 11:20 PM |
It is quite possible to add a user (or group) to the sudoers and limit the command or commands to exactly what is specified in the sudoers file. This way you can specifically tailor allowing something to be done as root by that user but have it detailed enough to do exactly what is allowed and no more.
I would consider using that method to allow the mount and umount commands in your script to be run as that user, allowing it to mount and dismount that share, and still limit what that user can do.
Read up on the sudoers file structure and config and you will see what I mean.
The system requires that mount and umount be done as root (except for specific cases that may be done with entries in /etc/fstab, but that is another whole conversation)
|