NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

garyd9's avatar
garyd9
Virtuoso
Jun 24, 2016

BUG: domain names - upper vs lower case

OS 6.5.0/6.5.1 (and many earlier versions)

 

(NOTE:  I'm currently dealing with netgear on a completely different problem which is preventing me from rebooting my NAS or doing anything that would cause any interruption in network traffic.  This process will probably take another 24-36 hours to run.  So, "try to reboot" isn't helpful.  Even if it would reverse what I'm describing below, it still leaves the BUG that the issue keeps popping up.)

 

(Another NOTE:  Netgear employees, please don't reply to this thread with a canned "welcome to the forum, to get started, do you have a backup made, what version are you running, etc" message.  What's needed is one of your engineers proficient in samba and ADS to look at the problem and fix it for ALL users.)

 

I've been using readynas products for many years with a windows domain (active directory) and there's one problem that keeps cropping up over and over.  Sometimes I don't see it for years, but it always eventually comes back:

 

The NAS names home directories based on the domain name.  For example, if my domain is "mydomain", then I can expect, on XRAID2, that the home directory for "garyd9" will be located at /data/home/mydomain/garyd9.  The problem is... sometimes it changes.  Sometimes, for a reason that I've never been able to understand, the NAS will boot and instead of using "mydomain", it will want to use MYDOMAIN.  For windows (which is case insensitive), this doesn't matter.  For the NAS (which uses case-sensitive linux file systems), this causes breakage.

 

Real Example: (actual domain and user names changed to protect my illusion of privacy.)

 

Today, I noticed that every single file in my home directory disappeared.  "Oh, no", I cry.  It'll take hours to pull that data back from my backup.  First, though, I go into the admin web interface and try to see what might have happened.. so I pop into the web interface, click shares, click browse, and start browsing the "home" subdirectories.  What I find is that my files are still there, exactly where they should be:  /data/home/mydomain/garyd9.  But, when I browse from windows, it's an empty folder.  Out of curiousity, I create a new file in my "home" share from windows.  That file does NOT show up in /data/home/mydomain/garyd9 when viewed from the web admin interface.

 

However, it DOES show up in /data/home/MYDOMAIN/garyd9.  

 

So, basically, the NAS today decided that I didn't need the files I had stored in mydomain/garyd9, and that it'd change it's interpretation of life to use the all CAPS "MYDOMAIN", which effectively granted me a brand new home share with nothing in it.

 

THIS IS BAD.  THIS IS VERY BAD.  This isn't the first time it's happened to me, either.  Here's a thread from a year ago when I had a similar situation:  https://community.netgear.com/t5/ReadyNAS-in-Business/quot-home-quot-directories-are-all-messed-up-how-to-just-wipe/m-p/965973

 

In that case, I didn't really push for Netgear to resolve the core problem - I just wanted help to work around it - which is a good thing because netgear apparently decided to completely ignore the core problem of the domain being renamed.  (Yes, in linux, changing the case of a string is RENAMING IT.)

 

So.. netgear.. If you are unable or unwilling to resolve the core issue, here's a REALLY simple "solution" to the problem:  Always force the domain name when used with the %D substitution to all upper case.  (or, all lower case.)  Being that Active Directory relies on DNS to function, and that DNS is case insensitive, this SHOULD work 100% of the time.  (You do compile a modified version of samba, right?)

 

 

 

9 Replies

Replies have been turned off for this discussion
  • Perhaps related (and hopefully helps netgear resolve this issue)...  (I have two NAS devices running right now.  Both are joined to the AD.  One has the ALL UPPERCASE DOMAIN NAME in the home path (nas516) and one has the domain in all lower case (NasPro.)  BOTH devices are configured identically on the authentication page of frontview.  Yesterday, both devices were using all lowercase domain names in the home paths.  Today, Nas516 switched to all uppercase domain names in the paths. 

     

    I've run a few samba commands on both devices to try and see what might be different:

     

    NasPro (working properly)

    root@NasPro:/etc/frontview/samba# wbinfo -D mydomain
    Name              : mydomain
    Alt_Name          : mydomain.local
    SID               : <removed>
    Active Directory  : Yes
    Native            : Yes
    Primary           : Yes

    Nas516 (switch to uppercase today)

    root@Nas516:/etc/samba# wbinfo -D mydomain
    Name              : MYDOMAIN
    Alt_Name          : MYDOMAIN.LOCAL
    SID               : <removed>
    Active Directory  : Yes
    Native            : No
    Primary           : Yes

    What's different:  Obvously, nas516 is showing my domain name in all upper case, while NasPro is showing in all lower case.  The SID's appeared identical (and didn't seem interesting to me anyway.)  What I'm not quite understanding is the "Native" field.  On NasPro it's "yes" and on Nas516 it's "no".  Could that "native" field be related to the domain name case issue?

     

    So, just for giggles, I removed the nas516 machine from the domain (changed Authentication->access type from "active directory" to "local users") and saved.  Waited a minute or 5, and then changed it back to "active directory" (typing in my pw again.)  Suddenly, on nas516, garyd9's home directory is again referencing "/data/home/mydomain/garyd9" again.  As well, "wbinfo -D mydomain" output looks exactly like the output seen on the naspro (lowercase domain names and native is "yes.")

     

    So, that partially answers why the domain name is coming up in all upper case in some situations.  The next question becomes:  Why would samba NOT connect in native mode some of the time (but not all the time)?  

     

    Another question (directed towards netgear) is:  Can you change the readynas firmware somehow to detect if "native mode" didn't happen, and somehow retry the samba negotiation?

     

    (I'm sure I'll keep replying to myself as I find more information.  It'd be REALLY nice if netgear's samba/AD SME could also jump in and offer some feedback...)

    • garyd9's avatar
      garyd9
      Virtuoso

      Another problem that this bug seems to cause:  home directory snapshots aren't taken (or are taken from the wrong place.)  So, instead of taking a snapshot of /data/home/mydomain/garyd9, it's taking a snapshot of /data/home/MYDOMAIN/garyd9.

       

      This is becoming a silly mess...

    • mdgm-ntgr's avatar
      mdgm-ntgr
      NETGEAR Employee Retired

      I have just asked engineering about this.

      Do you have any steps to reliably reproduce this problem?

      • garyd9's avatar
        garyd9
        Virtuoso

        Reliably, 100% of the time?  No.  about 20% of the time after a reboot of the NAS I see it.  The simple solution would be for netgear to just force any domain name to upper case (as Windows/SMB is case insensitive.)  Obviously, that's a samba issue, but I'm pretty sure that netgear makes modifications to the base samba distro for the readynas products.

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More