Suddenly for a reason I do not know, my USB wifi stopped working on Ubuntu but still works on Windows. I get this message when I plug it to Ubuntu laptop:

“NamBe” contains software intended to be automatically started. Would you like to run it? If you don’t trust this location or aren’t sure, press Cancel.

When I press on Run, it shows this error instead:

Unable to locate the program

This USB Wifi is still working well on an other laptop where I have Windows 10 though.

How to fix this?


  • Output of sudo fdisk -l without the adapter being plugged
  • Output of sudo fdisk -l after plugging the adapter

EDIT 2: (for user.dz)

  • Output of lsusb without the adapter being plugged
  • Output of lsusb with the adapter being plugged

P.S. I will edit later this post to respond to the other comments too

  • 1
    It looks like your Huwei Hilink includes some flash storage Please edit your post to include the difference between sudo fdisk -l with and without the device plugged in – Elder Geek Oct 8 '16 at 16:42
  • @avazwij, would you add output of lsusb . Unplug the device, run udevadm monitor, plug it again, post its output too. – user.dz Oct 8 '16 at 18:59
  • Also please send output of dmesg. – Harshit Oct 9 '16 at 16:29
  • 1
    @avazwij, it seems to me a usb-modeswitch problem. After you get the requested outputs above, try this solution askubuntu.com/a/156594/26246 . – user.dz Oct 10 '16 at 12:33
  • Are you sure you don't have those links backwards? I've seeing a /dev/sdb on the "after plugging the adapter" link and not on the "without the adapter being plugged" (fdisk -l section) – Elder Geek Oct 10 '16 at 17:29

You're solving the wrong problem here. Why run the script when you can just have the system auto-detect your modem and Just Work™.

If you run a modeswitch command on the modem, it will activate itself as a modem instead of mass storage, and you system will automatically detect it as such.

Reading your lsusb output, we have this:

Bus 002 Device 003: ID 12d1:1f01 Huawei Technologies Co., Ltd. E353/E3131 (Mass storage mode)

So, let's make the mode auto-set to modem mode. In a terminal, run the following command:

sudo nano /lib/udev/rules.d/40-usb_modeswitch.rules

At the very bottom of the opened file, paste in this exact string:

# Huawei E353/E3131
ATTR{idVendor}=="12d1", ATTR{idProduct}=="1f01", RUN +="usb_modeswitch '%b/%k'" 

Unplug your modem and reboot the system. Upon restart, plug in the modem. The system should automatically detect it as a modem and connect you to the internet. You won't need to auto-run anything, and you won't have the partition mounted on your computer.



Your sudo fdisk -l output with the adapter unplugged contains the following at line 112:

Disk /dev/sdb: 3,7 GiB, 4003463168 bytes, 7819264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc3072e18

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *     8064 7819263 7811200  3,7G  c W95 FAT32 (LBA)

The output with your adapter unplugged ends at line 107.

Edit 1 - New Information from OP

Here is a screenshot of USB files:

USB Startup

In order to disable auto-run of the USB (generating the error message) go to System Settings, Details, Removable Media and check the last box to never auto-run inserted media:

Removable Media

This should make the error message go away when the USB is inserted.

  • @avazwij So your USB WiFi stick serves dual purpose as /dev/sdb (flash drive) with 4 GB of space.? – WinEunuuchs2Unix Oct 10 '16 at 7:41
  • In previous months, it worked ONLY as a WiFi adapter. Now that it stopped worked suddenly on Ubuntu 16, it looks like my computer thinks it is a USB for storage and not for connecting to internet. But on Windows it still works fine just as a WiFi adapter and not a USB storage. Thank you – avazwij Oct 10 '16 at 7:44
  • If you don't know what files are stored on it can you run the command pmount /dev/sdb1 and list the files on it? – WinEunuuchs2Unix Oct 10 '16 at 7:51
  • I can not delete AUTORUN.INF because all the content is ready only. Thank you – avazwij Oct 10 '16 at 8:24
  • I've updated the answer based on your file listing. Notice there is an install_linux in your screen shot. Perhaps you need to rerun this after installation of Ubuntu 16.04. – WinEunuuchs2Unix Oct 10 '16 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.