LinuxCommandLibrary

nxc-nfs

Manage NFS shares for LXC containers

TLDR

Detect the version of a remote NFS server

$ nxc nfs [192.168.178.0/24]
copy

List the available NFS shares
$ nxc nfs [192.168.178.2] --shares
copy

Enumerate the exposed shares recursively to the specified depth
$ nxc nfs [192.168.178.2] --enum-shares [5]
copy

Download the specified remote file
$ nxc nfs [192.168.178.2] --get-file [path/to/remote_file] [path/to/local_file]
copy

Upload the specified local file to the remote share
$ nxc nfs [192.168.178.2] --put-file [path/to/local_file] [path/to/remote_file]
copy

SYNOPSIS

nxc-nfs [options] command_or_script

PARAMETERS

[options]
    Options will vary depending on the specific implementation of the script. Commonly, they could include options to set NFS mount point, user context for execution, or debug output.

command_or_script
    The name of the script (or path to the script) located within the shared NFS directory that will be executed on the remote host.

DESCRIPTION

The `nxc-nfs` command is not a standard or widely recognized Linux utility. It is likely a custom script or program designed to execute commands on a remote host via NFS (Network File System). The core functionality hinges on leveraging NFS to share a directory containing the script(s) to be executed.
The typical workflow involves mounting an NFS share from the target server onto the client machine. The `nxc-nfs` script then executes a pre-defined command or script located within that shared directory. This allows for remote execution without needing SSH or other remote access mechanisms.
Because it is non-standard, its exact functionality, configuration, and available parameters would depend entirely on the specific implementation of this script. Its primary use case is likely automation, remote system administration, or potentially specialized deployment scenarios where direct access is restricted and NFS is the only available protocol. Without examining the script itself, it is impossible to provide a definitive description. Its purpose relies heavily on the shared scripts' contents and intended functionality.

CAVEATS

Due to its non-standard nature, `nxc-nfs`'s security implications are paramount. Ensure proper NFS configuration, including export restrictions and user mappings, to prevent unauthorized access or execution. Consider using Kerberos for NFS to strengthen authentication. The reliability of this method also depends on the NFS server's uptime and network connectivity.

SECURITY CONSIDERATIONS

When using `nxc-nfs`, be extremely cautious about the permissions granted to the NFS share. Granting write access to the shared directory can create a significant security risk, as malicious actors could modify or replace the scripts being executed. Restrict access to only necessary users and groups. Verify that the NFS server is configured to prevent root squashing, which could allow remote users to execute commands with root privileges on the target machine.

SEE ALSO

nfs(5), mount(8), exportfs(8)

Copied to clipboard