Administering Client for NFS

Client for NFS enables Windows-based computers to access files on UNIX-based Network File System (NFS) servers.

  • Understanding the Client for NFS component

  • Client for NFS best practices

  • Using Client for NFS

  • Configuring Client for NFS

  • Troubleshooting Client for NFS


Understanding the Client for NFS component

Client for NFS gives a Windows-based computer the ability to act as a client to a Network File System (NFS) server. With Client for NFS, you can access files in a mixed environment of computers, operating systems, and networks.

Accessing files on NFS servers requires each Windows user to also have a UNIX-style identity. To enable users to access NFS shared resources using Client for NFS, you can include UNIX-style identity attributes in Active Directory.

Windows Server 2003 R2 domain controllers include the appropriate UNIX-style identity attributes from Internet Engineering Task Force (IETF) Request for Comments (RFC) 2307 (http://go.microsoft.com/fwlink/?LinkId=70027) in the Active Directory schema. They also include Identity Management for UNIX, an optional component, which facilitates managing UNIX-style identities in Active Directory.

In addition to retrieving UNIX-style identity data from Active Directory, Client for NFS can retrieve UNIX-style identity data from a User Name Mapping server. User Name Mapping is an optional component in Windows Server 2003 R2, Server Appliance Kit, and Services for UNIX, and it may already be available on your network. We do not recommend using User Name Mapping for new Client for NFS deployments.

Once Client for NFS is installed and configured, you can access files on the NFS server by mounting those files to your computer using either the UNIX server:/export format or the Windows \\server\share format. You can also browse shared folders by using the \\server\share format in Windows Explorer.

Additional references

Administering Client for NFS


Client for NFS best practices

Use the correct command prompt.

If you are running Client for NFS and using a command prompt, you should use the 32-bit version (Cmd.exe), which is available through the Start menu. Do not use the 16-bit version (Command.com). You must run Nfsadmin.exe from an elevated privilege command prompt to change Client for NFS configuration settings.

Avoid using hard mounts.

Regardless of the mount type, Client for NFS will not indefinitely try to mount an NFS shared resource. Once the shared resource has been successfully mounted, if the mount type is a hard mount and the Network File System (NFS) server becomes unavailable, Client for NFS will retry accessing the shared resource until the NFS server is once again available. As a result, Windows applications that are trying to access the shared resource will appear to stop responding.

Note

The umount command will disconnect a hard mount — even if the server is unavailable.

Additional references

Administering Client for NFS


Using Client for NFS

  • Starting Client for NFS

  • Stopping Client for NFS

  • Mounting an NFS shared resource to a drive letter

  • Unmounting an NFS shared resource from a drive letter

  • Configuring NFS permissions on a file or folder

  • Viewing NFS mount options and properties

  • Viewing NFS server properties

Additional references

Administering Client for NFS


Starting Client for NFS

To start Client for NFS from the Windows interface

  1. Open Services for Network File System: click Start, point to Programs or All Programs, point to Administrative Tools, and then click Services for Network File System (NFS).

  2. If necessary, connect to the computer that you want to manage.

  3. Right-click Client for NFS, and then click Start Service.

To start Client for NFS from the command line

  1. Open an elevated privilege command prompt.

  2. At the command prompt, type:

    nfsadmin client [ComputerName] start

    Argument Description

    ComputerName

    The name of the computer on which you want to start Client for NFS.

    Note

    To view the complete syntax for this command, at a command prompt, type: nfsadmin client /?

Additional references

Using Client for NFS


Stopping Client for NFS

To stop Client for NFS from the Windows interface

  1. Open Services for Network File System: click Start, point to Programs or All Programs, point to Administrative Tools, and then click Services for Network File System (NFS).

  2. If necessary, connect to the computer that you want to manage.

  3. Right-click Client for NFS, and then click Stop.

To stop Client for NFS from the command line

  1. Open a command prompt with elevated privileges.

  2. At the command prompt, type:

    nfsadmin client [ComputerName] stop

    Argument Description

    ComputerName

    The name of the computer on which you want to stop Client for NFS.

    Note

    To view the complete syntax for this command, at a command prompt, type: nfsadmin client /?

Additional references

Using Client for NFS


Mounting an NFS shared resource to a drive letter

To mount an NFS shared resource to a drive letter using the command line

  1. Open a command prompt (this does not need to be an elevated command prompt).

  2. At the command prompt, type the following:

    mount [–o Options] ComputerName:\ShareName {DeviceName | *}

    or

    mount [–o Options] \\ComputerName\ShareName {DeviceName | *}

    Argument Description

    –o rsize=n

    The read buffer size, in kilobytes. Acceptable values are 1, 2, 4, 8, 16, and 32. The default is 32 KB.

    –o wsize=n

    The write buffer size, in kilobytes. Acceptable values are 1, 2, 4, 8, 16, and 32. The default is 32 KB.

    –o timeout=n

    The time-out for a remote procedure call (RPC), in seconds. Acceptable values are 0.8, 0.9, and any integer in the range 1-60. The default is 0.8.

    –o retry=n

    The number of retries for a soft mount. Acceptable values are integers in the range 1-10. The default is 1.

    –o mtype={soft | hard}

    Soft or hard mount. Regardless of the mount type, the mount will return if it cannot immediately mount the shared resource. However, once the shared resource has been successfully mounted, if the mount type is a hard mount and the Network File System (NFS) server becomes unavailable, Client for NFS will retry accessing the shared resource until the NFS server is once again available. As a result, Windows applications that are trying to access the shared resource will appear to stop responding.

    –o anon

    Mounts as anonymous user.

    –o nolock

    Disables locking. This option might improve performance if you only need to read files.

    -o lang={euc-jp | euc-tw | euc-kr | shift-jis | big5 | ksc5601 | gb2312-80 | ansi}

    Specifies the default encoding used for file and directory names and, if used, must be set to one of the following:

    • ansi

    • big5 (Chinese)

    • euc-jp (Japanese)

    • euc-kr (Korean)

    • euc-tw (Chinese)

    • gb2312-80 (Simplified Chinese)

    • ksc5601 (Korean)

    • shift-jis (Japanese)

    If this option is set to ANSI on systems configured for non-English locales, the encoding scheme is set to the default encoding scheme for the locale. The following are the default encoding schemes for the indicated locales:

    Japanese: SHIFT-JIS

    Korean: KS_C_5601-1987

    Simplified Chinese: GB2312-80

    Traditional Chinese: BIG5

    -o fileaccess=mode

    Specifies the default permission mode of new files that are created on the NFS shared resource. The permission mode is written as a three-digit number in the form ogw, where o, g, and w represent the access granted to the file (o)wner, (g)roup, and the (w)orld. Each digit must be in the range 0–7, with the values corresponding to the following access levels:

    • 0: No access

    • 1: x (execute access)

    • 2: w (write access)

    • 3: wx (write and execute access)

    • 4: r (read access)

    • 5: rx (read and execute access)

    • 6: rw (read and write access)

    • 7: rwx (read, write, and execute access)

    -o casesensitive

    Forces case-sensitive file lookup (similar to that of UNIX-based NFS clients).

    ComputerName

    The name of the server with the shared resource to mount.

    ShareName

    The name of the shared directory to mount.

    DeviceName | *

    The drive letter to assign to the mounted shared resource. The asterisk (*) means to use the next available letter.

    Notes
    • To view the complete syntax for this command, at a command prompt, type: mount /?
    • When mounting an NFS shared resource to a drive letter, we recommend the format ComputerName:/ ShareName.
    • You can also use the net use command to mount an NFS shared resource to a drive letter. For more information about using the net use command, see Windows Help or, at a command prompt, type: net use /?

Additional references

Using Client for NFS


Unmounting an NFS shared resource from a drive letter

To unmount an NFS shared resource from a drive letter using the command line

  1. Open a command prompt (this does not need to be an elevated command prompt).

  2. At the command prompt, type:

    umount [–f] {–a | Drive}

    Argument Description

    –f

    Forces the unmount of a Network File System (NFS) network drive.

    –a

    Unmounts all NFS network drives.

    Drive

    The drive letter that is mapped to an NFS shared resource.

    Note

    To view the complete syntax for this command, at a command prompt, type: umount /?

Additional references

Using Client for NFS


Configuring NFS permissions on a file or folder

To configure NFS permissions using Windows Explorer

  1. Open Windows Explorer: click Start, point to Programs or All Programs, point to Accessories, and then click Windows Explorer.

  2. Right-click the name of the file or directory.

  3. Click Properties, and then click the NFS Attributes tab.

  4. In File attributes (mode), select or clear the check boxes corresponding to the mode bits that you want to use, click Apply, and then click OK. To close the dialog box without making any changes, click Cancel.

    Notes
    • Only the owner of a file or a user with appropriate permissions can change the mode of a file.
    • There is no command-line method for this procedure.

Additional references

Using Client for NFS


Viewing NFS mount options and properties

To view NFS mount options using Windows Explorer

  1. Open Windows Explorer: click Start, point to Programs or All Programs, point to Accessories, and then click Windows Explorer.

  2. Right-click the name of the file or directory, right-click the drive that is assigned to a Network File System (NFS) mount, and then click Properties.

  3. To view the NFS mount options for the drive, click NFS Mount Options.

  4. To view the NFS properties for the mounted directory, click NFS Attributes.

    Note

    If you are logged on with an account that maps to a UNIX account on the NFS server with appropriate administrative credentials, you can change the UNIX file-mode permissions of the mounted directory when viewing the NFS properties.
To view NFS mount options using the command line

  1. Open a command prompt (this does not need to be an elevated command prompt).

  2. At the command prompt, type:

    mount

    Notes
    • When used without command-line options, the mount command displays all mounted volumes and their options.
    • To view the complete syntax for this command, at a command prompt, type: mount /?

Additional references

Using Client for NFS


Viewing NFS server properties

To view NFS server properties using the command line

  1. Open a command prompt (this does not need to be an elevated command prompt).

  2. At the command prompt, type:

    showmount -e Server

    Argument Description

    Server

    The name of the computer for which you want to view properties.

    Note

    To view the complete syntax for this command, at a command prompt, type: showmount /?

Additional references

Using Client for NFS


Configuring Client for NFS

  • Specifying how Client for NFS retrieves UNIX-style identity data

  • Selecting the network protocol

  • Setting the default mount type

  • Specifying default UNIX permissions for new files

Additional references

Administering Client for NFS


Specifying how Client for NFS retrieves UNIX-style identity data

Access to Network File System (NFS) file servers requires UNIX-style user and group identities, which are not the same as Windows user and group identities. To enable users to access NFS shared resources, Client for NFS can retrieve UNIX-style identity data from Active Directory (if the schema includes the appropriate attributes), or from a User Name Mapping server. If Active Directory does not include UNIX-style identity attributes and a User Name Mapping server is not available on your network, then Client for NFS will attempt to access NFS resources anonymously.

NFS servers often limit anonymous access to read-only operations, or simply do not allow anonymous access.

To specify how Client for NFS retrieves UNIX-style identity data using the Windows interface

  1. Open Services for Network File System: click Start, point to Programs or All Programs, point to Administrative Tools, and then click Services for Network File System (NFS).

  2. If necessary, connect to the computer that you want to manage.

  3. Right-click Services for NFS, and then click Properties.

  4. Specify how Client for NFS retrieves UNIX-style identity data:

    • To use Active Directory, select the Active Directory domain name check box, type the domain name, and then click Apply.

    • To use User Name Mapping, select the User Name Mapping check box, type the name of the mapping server, and then click Apply.

    Note

    Before using User Name Mapping, the computer running Client for NFS must be listed in the .maphosts file on the computer running User Name Mapping.

To specify how Client for NFS retrieves UNIX-style identity data using the command line

  1. Open a command prompt with elevated privileges.

  2. Specify how Client for NFS retrieves UNIX-style identity data:

    • To use Active Directory, type:

      nfsadmin mapping [ComputerName] config adlookup=yes addomain=DomainName

    • To use User Name Mapping, type:

      nfsadmin mapping [ComputerName] config maplookup=yes mapsvr=ServerName

    Argument Description

    DomainName

    The name of the domain controller that you want to use.

    ComputerName

    The name of the computer that you want to manage.

    ServerName

    The name of the mapping server that you want to use.

    Note

    Before using User Name Mapping, the computer running Client for NFS must be listed in the .maphosts file on the computer running User Name Mapping.

Additional references

Configuring Client for NFS


Selecting the network protocol

To set the network protocol using the Windows interface

  1. Open Services for Network File System: click Start, point to Programs or All Programs, point to Administrative Tools, and then click Services for Network File System (NFS).

  2. If necessary, connect to the computer you want to manage.

  3. Right-click Client for NFS, and then click Properties.

  4. Click the Client Settings tab.

  5. From the Transport Protocol list box, select the type of protocol that Client for NFS uses.

  6. To save this setting, click Apply.

To set the network protocol using the command line

  1. Open a command prompt with elevated privileges.

  2. At the command prompt, type:

    nfsadmin client [ComputerName] config protocol={TCP | UDP | TCP+UDP}

    Argument Description

    ComputerName

    The name of the computer that you want to manage.

    protocol={TCP | UDP | TCP+UDP}

    Set to TCP for Transmission Control Protocol (TCP), UDP for User Datagram Protocol (UDP), or TCP+UDP for both.

    Note

    To view the complete syntax for this command, at a command prompt, type: nfsadmin client /?

Additional references

Configuring Client for NFS


Setting the default mount type

To set the type of mount using the Windows interface

  1. Open Services for Network File System: click Start, point to Programs or All Programs, point to Administrative Tools, and then click Services for Network File System (NFS).

  2. If necessary, connect to the computer you want to manage.

  3. Right-click Client for NFS, and then click Properties.

  4. Click the Client Settings tab.

  5. To use soft mounts, select Use soft mounts and specify the number of times that Client for NFS will attempt to make a connection in Number of times to retry. To use hard mounts, select Use hard mounts.

  6. Specify the amount of time between connection attempts in Retry interval.

  7. To save these settings, click Apply.

To set the type of mount using the command line

  1. Open a command prompt with elevated privileges.

  2. At the command prompt, specify the mount type by typing:

    nfsadmin client [ComputerName] config mtype={hard | soft}

  3. Specify the number of soft mount retries by typing:

    nfsadmin client [ComputerName] config retry=n

    Argument Description

    ComputerName

    The name of the computer that you want to manage.

    mtype={hard | soft}

    The type of mount.

    retry=n

    The number of times Client for NFS will attempt to make a connection for a soft mount. This value must be in the range 1–10. The default value is 1.

    Note

    To view the complete syntax for this command, at a command prompt, type: nfsadmin client /?

Additional references

Configuring Client for NFS


Specifying default UNIX permissions for new files

When a file is created on a Network File System (NFS) server, a default set of permissions is applied to the file to control access to it. Client for NFS uses the following default permissions for newly created files on NFS shared resources:

  • User: rwx (read, write, and execute)

  • Group: r–x (read and execute)

  • Others: r–x (read and execute)

To specify default file permissions using the Windows interface

  1. Open Services for Network File System: click Start, point to Programs or All Programs, point to Administrative Tools, and then click Services for Network File System (NFS).

  2. If necessary, connect to the computer you want to manage.

  3. Right-click Client for NFS, and then click Properties.

  4. Click the File Permissions tab, and select the permissions to use as defaults.

  5. To save these settings, click Apply.
To specify default file permissions using the command line

  1. Open a command prompt with elevated privileges.

  2. At the command prompt, type the following:

    nfsadmin client [ComputerName] fileaccess=ogw

    Argument Description

    ComputerName

    The name of the computer that you want to manage.

    ogw

    o = Code for owner permissions
    g = Code for group permissions
    w = Code for permissions for others

    Codes for permissions are shown in the following table.

    Code Description

    0

    None

    1

    Execute

    2

    Write

    3

    Execute and write

    4

    Read

    5

    Read and execute

    6

    Read and write

    7

    Read, write, and execute

    Note

    To view the complete syntax for this command, at a command prompt, type nfsadmin client /?

Additional references

Configuring Client for NFS


Troubleshooting Client for NFS

What problem are you having?

  • I need Client for NFS to only use “privileged” ports.

  • An error occurred while trying to communicate with the Client for NFS service.

  • System error 1722 has occurred. The remote procedure call (RPC) server is unavailable.

  • An attempt to mount a shared directory produces network error 67 — the network name was not found.

  • I received the message RPC: Timed out or RPC: Port mapper failure – RPC: Timed out.

  • A file I created on an NFS shared resource is shown as having been created by nobody:nogroup or by –2:–1, or the user identifier (UID) is a very large number (2**32-2).

  • I cannot access files on an NFS shared resource.

  • I cannot access files on a mapped network drive.

  • I cannot access a multipart export using a Universal Naming Convention (UNC) path.

  • I cannot mount a shared root directory (/) on a UNIX computer.

  • I received a delayed write error message.

  • Attempting to mount with the net use command results in the error message: 1788: The trust relationship between the primary domain and the trusted domain failed.

  • Even after changing the default permissions for new files, new files on a mount are still created with the previous permissions.

  • After restarting the computer, the mount parameters of a persistent mount are changed.

  • Authenticated users cannot access NFS resources, or all NFS shared resources are accessed as Anonymous.

I need Client for NFS to only use “privileged” ports.

Cause

Some Network File System (NFS) servers have a concept of “privileged” ports (meaning ports numbered lower than 1024), and will not accept client connections from ports above that range.

Solution

Log onto computers running Client for NFS, set the following registry key to 1, and then restart Client for NFS:

HKLM\Software\Microsoft\Client for NFS\CurrentVersion\default

DWORD “UseReservedPorts”

An error occurred while trying to communicate with the Client for NFS service.

Cause

The Client for NFS service is not started, cannot contact Active Directory or the User Name Mapping server, or is running with credentials that are mapped incorrectly.

Solution

In the Services for Network File System Microsoft Management (MMC) console, you can ensure that the service is started by right-clicking Client for NFS, and then clicking Start. In the console, ensure that the name of the correct Active Directory domain or User Name Mapping server is specified. Check with the administrator of the Active Directory or the User Name Mapping server to ensure that your Windows user identity is properly mapped to your UNIX user identity.

System error 1722 has occurred. The remote procedure call (RPC) server is unavailable.

Cause

The Client for NFS service is not started.

Solution

In Services for Network File System, right-click Client for NFS, and then click Start.

An attempt to mount a shared directory produces network error 67 — the network name was not found.

Cause

The directory is not shared, or the server is unable to resolve the client name.

Solution

Use showmount –e server to display the names of shared directories on the server. If this fails with a remote procedure call (RPC) time-out, contact the administrator of the NFS server to ensure that the NFS and Portmap services are started on the server. Also, ensure that the NFS server accepts connections from this computer.

I received the message RPC: Timed out or RPC: Port mapper failure – RPC: Timed out.

Cause

Either the Portmap or NFS services are not running on the server, or Client for NFS performance settings need to be adjusted.

Solution

Ensure that the services are started. If Portmap and NFS services are running on the server, in Services for Network File System, right-click Client for NFS, click Properties, and then increase the maximum number of retries and the interval between retries.

A file I created on an NFS shared resource is shown as having been created by nobody:nogroup or by –2:–1, or the user identifier (UID) is a very large number (2**32-2).

Cause

Your Windows user identity is not properly mapped in Active Directory or User Name Mapping.

Solution

In the Services for Network File System snap-in, ensure that the name of the correct Active Directory domain or User Name Mapping server is specified. Check with your Active Directory or User Name Mapping administrator to ensure that your Windows user identity is properly mapped to your UNIX user identity.

I cannot access files on an NFS shared resource.

Cause

Services for NFS has not designated an Active Directory domain or a User Name Mapping server for use.

Solution

Specify the correct Active Directory domain or User Name Mapping server. For more information, see Specifying how Client for NFS retrieves UNIX-style identity data.

I cannot access files on a mapped network drive.

Cause

Services for NFS has not designated an Active Directory domain or a User Name Mapping server for use.

Solution

Specify the correct Active Directory domain or User Name Mapping server. For more information, see Specifying how Client for NFS retrieves UNIX-style identity data.

I cannot access a multipart export using a Universal Naming Convention (UNC) path.

Cause

Client for NFS can only access a multipart export, such as server:/d1/d2/d3, when the shared resource is mounted to a drive letter.

Solution

Mount the multipart export to a drive letter:

mount server:/d1/d2/d3 *

I cannot mount a shared root directory (/) on a UNIX computer.

Cause

When a root directory (/) on a UNIX computer is shared, Client for NFS cannot mount it by using the standard path syntax (net use * \\server\ or net use server:/).

Solution

To mount the root directory, type this command:

net use * \\server\!

The share name must be an exclamation mark (!).

I received a delayed write error message.

Cause

Either the NFS server is not responding or the Client for NFS performance options are not properly adjusted.

Solution

Use the showmount –e server command to determine whether the NFS server is running properly.

Attempting to mount with the net use command results in the error message: 1788: The trust relationship between the primary domain and the trusted domain failed.

Cause

You are attempting to access a computer in an untrusted domain, and either Client for NFS has not started on your computer or the shared resource is not available on the NFS server.

Solution

In the Services for Network File System snap-in, right-click Client for NFS, and then click Start. From a command prompt, use showmount –e server to display the names of shared directories on the server. If this fails with an RPC timeout, contact the administrator of the NFS server to ensure that the NFS and Portmap services are started on the server and that the shared resource is available.

Even after changing the default permissions for new files, new files on a mount are still created with the previous permissions.

Cause

This is by design. New default permissions are only applied to new mounts.

Solution

Unmount and then remount the shared directory.

After restarting the computer, the mount parameters of a persistent mount are changed.

Cause

You used the net use command to mount the directory.

Solution

Use the mount utility to mount the directory.

Authenticated users cannot access NFS resources, or all NFS shared resources are accessed as Anonymous.

Cause

Services for NFS is not configured to retrieve UNIX-style identity data from Active Directory or User Name Mapping.

Solution

In the Services for Network File MMC console, right-click Services for NFS, click Properties, and ensure that the proper Active Directory domain name or User Name Mapping server name is set.

If you are using User Name Mapping, ensure that the .maphosts file on the computer that is running User Name Mapping specifies the name or IP address of this computer.

Additional references

Administering Client for NFS