nas ops cmd
This is my op script.
This is stupidly simple script to elevate priviledges in order to manage NFS shares on my QNAP NAS.
The idea is that NFS shares do
squash-root so admin access is
disallowed through NFS. This gives a convenient way to issue
root level commands without using NFS but instead use
(and ssh authentication) to do this, which should provide
This script makes the following assumptions:
- the user has a
ssh-keywith admin access on the NAS.
- NFS is mounted using
autofsand is on the
The way it works is that it uses the current working directory
when the command is launch. It then resolves any symlink path and
check is the directory is in the
/net/ virtual folder so the
NFS server is the second component of the path.