What's new

Strange issue with renaming a USB drive attached to the router...

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

chugbug

Occasional Visitor
Hello all! I need some help...

I recently installed an Asus RT-AC68U router. After a few days of stable running I updated the firmware yesterday with Asuswrt-Merlin (v384.5). Everything seems to be working fine, but I ran into a bit of an odd situation with an attached USB drive. To make a long story short, I changed the name of the drive, but can't seem to get it recognized by Windows using that name.

The drive is a 2TB Western Digital (WD) Elements, and as mentioned it's connected to the router's USB 3.0 port. I can access it just fine through any of my computers on the network. But the NAME of the drive on the network is the issue. It's showing up under the router's name (RT-AC68U).

When I first setup the router, I didn't check that the drive was showing at first. But when I did check it, at first I didn't think it was being recognized, because I didn't see a recognizable name. But after clicking the various devices listed, I found that it was showing up, but under the router's name.

After a bit of investigating, I found a post that said you had to change the name in the "Media Server and Services" panel in the USB APPLICATION section. So I went in and changed the name. At first, I changed it in MEDIA SERVER tab. But then I realized it changed the name of the ROUTER, and I should have changed it in the NETWORK PLACE panel.

BUT THAT didn't seem to work either. Although the name now reads as it should in the Network Place panel in the router (I renamed it "WD_Elements"), it's still showing up in throughout the network (in Windows Explorer) under the routers model number. It changed the name, but only dropping the last 4 letters/number set (from RT-AC68U-CCF8, to just RT-AC68U).

So I'm a bit perplexed. Am I doing something wrong? Did I change the name in the wrong place? If so, then WHERE should it be changed so it shows up correctly in Windows Explorer throughout the network? I tried just using "right-click" in Windows Explorer on a Windows 10 pc to change the name, but all it does is BEEP at me.

Any suggestions would be appreciated!

Thanks...JEB
 
I can't follow what the problem is. Can you post a screenshot showing the problem and stating what it is you want it to say instead.
 
Sounds normal to me. I have a USB thumb drive and accessing it through SMB you access the router itself and it have the folders mounted. If I connect a second drive it shows up under the same folder structure.

There is a setting in SMB for simple sharing or simple folder names. If you turn that off the drive name is appended to the folder names.


Sent from my iPhone using Tapatalk
 
Sorry you couldn't follow Colin. But to be honest, the issue is a bit confusing anyway. I'll try explaining it again and include some photo's this time...

Bottom line, I'm trying to change the DEFAULT NAME the router (RT-AC68U) assigned my USB DRIVE. But when I change the name, it's not being reflected (in Windows Explorer) under the device I thought it should. Maybe it's just a terminology understanding issue on my part. But if it is, then the software seems a bit misleading in where it shows the devices.

After installing the router, I couldn't find my USB drive. Eventually I realized the router had selfishly assigned it's own name (RT-AC68U) to the drive. So it's showing up as RT-AC68U in Windows Explorer. After some online searching, I found instructions for changing the name in the MEDIA SEVERS & SERVICES panel under USB APPLICATION section.

I FIRST CHANGED it under MEDIA SERVER. Which I then assumed the device name would be rename under COMPUTERS in WINDOWS EXPLORER'S NETWORK panel. But it didn't. It changed the name of the device under MEDIA DEVICES. OK. Makes sense. But not really what I expected. I was expecting it to be changed under COMPUTERS. So I changed that name back, then changed it under NETWORK PLACE. But now although the name reads correctly in the router Network Place panel, it still shows up under the ROUTER's NAME in WINDOWS EXPLORER/COMPUTER(S).

So now it has me confused. Based on what changed each time, it seems I should change the name under MEDIA DEVICES..., then click THAT device when I want to access the USB Drive. But then WHAT is the device under Windows Explorer/Computers? Curiously, when I click THAT DEVICE (in COMPUTERS) it opens the router's login page in a browser, NOT my USB drive. And if that device isn't my USB drive, then why does my USB drive show up on the bottom of THAT (NETWORK PLACE) PANEL in the router's software??

I don't do any media streaming-- the drive is only used for file backups. So maybe one of those two devices (in the router software) should be turned off? If so, which one?

Attached are some snapshots:

Set 1 - After attempting to change the device's name in the Router's MEDIA SERVER & SERVICES panel:
Pic 1a -
Router's MEDIA SERVER & SERVICES panel showing the name changed to "WD_Elements".
Pic 1b - Windows Explorer/Network panel. Shows the name of the MEDIA DEVICE changed to "WD_Elements". HOWEVER I assumed that the device under COMPUTER would be my USB drive, and therefore have the name change (so then, WHAT IS THIS device?).
Pic-1a_Router_Media-Server_panel_(AFTER-change name).PNGPic-1b_WinExp-Network_panel_AFTER-change_MEDIA-SERVER.PNG

Set 2 - After attempting to change the device's name in the Router's NETWORK PLACES panel:
Pic 2a -
Router's NETWORK PLACE panel AFTER changing the name to "WD_Elements" (I changed it back again in the Media panel).
Pic 2a - Windows Explorer Network panel after changing the name, which show it still has the SAME DEFAULT name. I assumed this is where I should change it since it is actually showing my drive at the bottom of the panel. But if it is, then why isn't the name changing in Windows Explorer??
Pic-2a_Network-Place_panel_(AFTER-change name).PNGPic-2b_WinExp-Network_panel_AFTER-change_NETWORK-PLACE.PNG

Pic 3. Curiously, I also found this... This snapshot shows the Router's LAN panel. As you can see the DEVICE NAME here is reflecting the same changed name (WD_Elements) AFTER I changed it in the NETWORK PLACE panel.
Pic-3_Router_Ad-Settings_LAN_LAN-IP_panel_(named_WD_Elements).PNG

After going through all this, it seems a bit confusing! At least I now know WHAT I have to click (in Windows Explorer) to access the USB drive. But that's not satisfactory. I want it named correctly too. That shouldn't be asking too much, should it?

Thanks...JEB
 
Well done @chugbug . You win today's "it's probably always been there" bug hunt.:)

You're not doing anything wrong. The issue is that the name you are using under Network Place(Samba) contains an underscore (_). For some reason this causes the router to silently ignore the name and use the device name (RT-AC68U) instead.:confused:

I'll have look through the source code to see if I can track down why that's happening, because AFAIK an underscore is a valid character in NetBIOS names.

In the meantime you might just want to use a name that doesn't contain an underscore. It's always recommended in this forum to only use alphanumeric characters and a minus (-) for any input field. Using any other characters risks problems like the one you've discovered.
 
maybe better not to use "blank" in the name, change it to "-" for further testing.
 
@chugbug The issue is in write_smb_conf.c This code only accepts alphanumeric's, dot and minus. If it finds anything else it replaces the NetBIOS name with the router's productid.
Code:
/* For NETBIOS name,
 * 1. NetBIOS names are a sequence of alphanumeric characters.
 * 2. The hyphen ("-") and full-stop (".") characters may also be used
 *     in the NetBIOS name, but not as the first or last character.
 * 3. The NetBIOS name is 16 ASCII characters, however Microsoft limits
 *     the host name to 15 characters and reserves the 16th character
 *     as a NetBIOS Suffix
 */
int
is_valid_netbios_name(const char *name)
Code:
#else
    snprintf(p_computer_name, sizeof(p_computer_name), "%s", nvram_safe_get("computer_name"));
    if(strlen(p_computer_name) <= 0 || !is_valid_netbios_name(p_computer_name))
        snprintf(p_computer_name, sizeof(p_computer_name), "%s", get_productid());

    if(strlen(p_computer_name) > 0){
        fprintf(fp, "netbios name = %s\n", p_computer_name);
        fprintf(fp, "server string = %s\n", p_computer_name);
    }
#endif

@RMerlin Do we need some extra input validation on the Samba Device Name field?
 
Thanks Collin! Changing the "_" to "-" fixed it. The drive now shows up in Windows Explorer under the same name:

WD-Elements_after-change-name_6-13-18.PNG


Thanks for the help!
 
I have another question or two now if you don't mind... Not about the naming, but now it's about accessing the USB drive. I didn't try to access the drive until later (after I added the post above). But then when I did, I was surprised to get a LOG-IN panel asking for user/pass credentials. I didn't have login enabled in the router's Network Place panel for it, and never setup login credentials for the drive itself, so I was kind of stumped as to why it was asking for them. Then I got worried the naming might have reset something in the drive and now I wasn't going to be able to gain access without them. And now it seemed I couldn't access the drives folders without those credentials.

The login panel was clearly asking for the login credentials for WD-ELEMENTS, not the RT-AC68U. BUT, just by chance I decided to use the ROUTER'S credentials to see if those worked. And luckily those were what it wanted and I got in. So I thought it was a little odd that it was asking for the WD-ELEMENTS credentials, but it actually wanted those for the router. So was that the router's FIREWALL that was blocking direct access?

It doesn't appear that I have to login every time I want access-- I closed Windows Explorer then opened it back up again to access the folders and it didn't ask for the credentials again. But I'm wondering if I will have to login after every reboot of either the router or a networked pc? I use the USB drive as a second backup for my data, so I have a pc accessing it every day to run the backups. So I'm wondering if I'm going to need to create login credentials in my backup software (SyncBackSE) to access the drive?
 
The router is behaving as you have configured it. On the Network Place page you have selected "Allow guest login" = Off. This means that to access the shared folder you need to specify a user name and password.

If you look at the bottom of that page you will see that there is default user setup which is the same as the router's login account (admin).

After you have entered a valid user name and password for the shared folder Windows will remember it and not prompt you again until the PC is rebooted.

You can add extra user accounts just for the shared folder at the bottom of that page by clicking on the "+" icon and selecting the appropriate permissions.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Top