NFS Share on Win10 - Setting AnonymousUid / AnonymousGid doesn't work

Mastakilla

Patron
Joined
Jul 18, 2019
Messages
203
After setting AnonymousUid / AnonymousGid in the registry, as below...
1591877634923.png

And after rebooting the machine...

Windows still using "-2" as UID and GID??

1591877757261.png

While my NFS share needs it to be 0 as configured
1591877807474.png


Anyone have an idea how to solve this?

Thanks!
 

Mastakilla

Patron
Joined
Jul 18, 2019
Messages
203
Aha... I think I found a (the?) solution!

Although many websites say the DWORD in the registry must be called "AnonymousUid" and "AnonymousGid"
There was 1 website that said to call it "AnonymousUID" and "AnonymousGID"

After changing it to that and rebooting, it correctly mapped to UID/GID 0...
1591880214288.png

1591879116199.png


That last link also explains how to mount NFS shares on Windows without loosing all kind of security... (Mapping the Anonymous user to the root UID... The idea alone should make many people turn around in there grave...) I'll be trying that next...
 
Last edited:

Mastakilla

Patron
Joined
Jul 18, 2019
Messages
203
For anyone interested... The method explained in that last link to mount as a specific user, instead of anonymous, works!

Code:
C:\Users\m4st4>type C:\Windows\System32\drivers\etc\passwd
    m4st4:x:1000:0:FreeNAS user:C:\Users\m4st4

C:\Users\m4st4>mount \\192.168.10.10\mnt\hgstpool\nfsds p:
    p: is now successfully connected to \\192.168.10.10\mnt\hgstpool\nfsds
    
    The command completed successfully.

C:\Users\m4st4>mount
    
    Local    Remote                                 Properties
    -------------------------------------------------------------------------------
    p:       \\192.168.10.10\mnt\hgstpool\nfsds     UID=1000, GID=0
                                                    rsize=131072, wsize=131072
                                                    mount=soft, timeout=0.8
                                                    retry=1, locking=yes
                                                    fileaccess=755, lang=ANSI
                                                    casesensitive=no
                                                    sec=sys

C:\Users\m4st4>
 

Ssri

Cadet
Joined
Jun 22, 2023
Messages
3
For anyone interested... The method explained in that last link to mount as a specific user, instead of anonymous, works!

Code:
C:\Users\m4st4>type C:\Windows\System32\drivers\etc\passwd
    m4st4:x:1000:0:FreeNAS user:C:\Users\m4st4

C:\Users\m4st4>mount \\192.168.10.10\mnt\hgstpool\nfsds p:
    p: is now successfully connected to \\192.168.10.10\mnt\hgstpool\nfsds
   
    The command completed successfully.

C:\Users\m4st4>mount
   
    Local    Remote                                 Properties
    -------------------------------------------------------------------------------
    p:       \\192.168.10.10\mnt\hgstpool\nfsds     UID=1000, GID=0
                                                    rsize=131072, wsize=131072
                                                    mount=soft, timeout=0.8
                                                    retry=1, locking=yes
                                                    fileaccess=755, lang=ANSI
                                                    casesensitive=no
                                                    sec=sys

C:\Users\m4st4>
Thanks for this. Working perfectly. But it doesn't show the UID GID correctly however, I hand the issues to write on the NFS drive which has been fixed:


Code:
C:\Users\JoKeR>mount -o nolock \\192.168.0.130\mnt\TfastZ\vNAS N:
N: is now successfully connected to \\192.168.0.130\mnt\TfastZ\vNAS

The command completed successfully.

C:\Users\JoKeR>mount

Local    Remote                                 Properties
-------------------------------------------------------------------------------
N:       \\192.168.0.130\mnt\TfastZ\vNAS        UID=-2, GID=-2
                                                rsize=131072, wsize=131072
                                                mount=soft, timeout=0.8
                                                retry=1, locking=no
                                                fileaccess=755, lang=ANSI
                                                casesensitive=no
                                                sec=sys

C:\Users\JoKeR>type C:\Windows\System32\drivers\etc\passwd
joker:x:1000:1001:Windows User,,,:c:\users\JoKeR
 
Top