1nfsconf(8) System Manager's Manual nfsconf(8)
2
3
4
6 nfsconf - Query various NFS configuration settings
7
9 nfsconf --dump [-v|--verbose] [-f|--file infile.conf] [outfile]
10
11 nfsconf --get [-v|--verbose] [-f|--file infile.conf] [-a|--arg subsec‐
12 tion] section tag
13
14 nfsconf --isset [-v|--verbose] [-f|--file infile.conf] [-a|--arg sub‐
15 section] section tag
16
17 nfsconf --set [-v|--verbose] [-f|--file infile.conf] [-a|--arg subsec‐
18 tion] section tag value
19
20 nfsconf --unset [-v|--verbose] [-f|--file infile.conf] [-a|--arg sub‐
21 section] section tag
22
24 The nfsconf command can be used to test for and retrieve configuration
25 settings from a range of nfs-utils configuration files.
26
27 Modes
28 The following modes are available:
29
30 -d, --dump
31 Output an alphabetically sorted dump of the current configura‐
32 tion in conf file format. Accepts an optional filename in which
33 to write the output.
34
35 -i, --isset
36 Test if a specific tag has a value set.
37
38 -g, --get
39 Output the current value of the specified tag.
40
41 -s, --set
42 Update or Add a tag and value to the config file, creating the
43 file if necessary.
44
45 -u, --unset
46 Remove the specified tag and its value from the config file.
47
49 Options valid in all modes
50 -v, --verbose
51 Increase verbosity and print debugging information.
52
53 -f, --file infile
54 Select a different config file to operate upon, default is
55 /etc/nfs.conf
56
57 Options only valid in --get and --isset modes.
58 -a, --arg subsection
59 Select a specific sub-section
60
62 --isset mode
63 In this mode the command will return success (0) if the selected tag
64 has a value, any other exit code indicates the value is not set, or
65 some other error has occurred.
66
67 all other modes
68 Success is indicated by an exit status of zero, any other status indi‐
69 cates an error. Error messages are output on stderr, and increasing
70 verbosity will give more detailed explanations if any are available.
71
73 nfsconf -v --dump --file /tmp/testconf.conf sorted.conf
74 Check a new config file for syntax errors and output a sorted
75 version for ease of comparison with existing settings.
76
77 if ! nfsconf --isset gssd preferred-realm ; then echo 'No preferred
78 realm configured for gss'; fi
79 The tool allows for easy testing of configuration values from
80 shell scripts, here we test if a specific value has been set.
81
82 nfsconf --file /etc/nfsmount.conf --get --arg /home MountPoint back‐
83 ground
84 Show default value for background option for NFS mounts of the
85 /home path.
86
87 nfsconf --file /etc/nfs.conf --set nfsd debug 1
88 Enable debugging in nfsd
89
91 /etc/nfs.conf
92
94 nfsd(8), exportfs(8), idmapd(8), statd(8)
95
97 Justin Mitchell <jumitche@redhat.com>
98
99
100
101 2 May 2018 nfsconf(8)