What's new

USB drive mounted but not shared?

  • 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!

farhanito

Occasional Visitor
Hi,

I'm using ac68u, latest version with smb enabled.

When I plugged in a USB storage, it gets mounted fine, but smb does not automatically share its contents. I had to manually edit /etc/smb.conf and add shares info. That way I can access its contents fine, otherwise it's just empty.

But the edit always reverted on reboot.
What could have been the problem?

Thanks
 
Hi,

I'm using ac68u, latest version with smb enabled.

When I plugged in a USB storage, it gets mounted fine, but smb does not automatically share its contents. I had to manually edit /etc/smb.conf and add shares info. That way I can access its contents fine, otherwise it's just empty.

But the edit always reverted on reboot.
What could have been the problem?

Thanks
In the gui, Go to USB Application/Servers Center/Network Place (Samba) Sharing and enable Sharing Note: This is in stock ASUS firmware, Merlin might have some different screens.
 
Last edited:
It would be useful to see the contents of smb.conf before and after the changes you made. Then we might be able to understand the problem.
 
It would be useful to see the contents of smb.conf before and after the changes you made. Then we might be able to understand the problem.

With the usb drive plugged in, this is smb.conf before the changes
Code:
[global]
workgroup = WORKGROUP
netbios name = RT-AC68U-83E8
server string = RT-AC68U-83E8
unix charset = UTF8
display charset = UTF8
load printers = no
printing = bsd
printcap name = /dev/null
log file = /var/log.samba
log level = 0
max log size = 5
auth methods = guest
guest account = Admin
map to guest = Bad Password
guest ok = yes
encrypt passwords = yes
pam password change = no
null passwords = yes
force directory mode = 0777
force create mode = 0777
max connections = 5
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE
obey pam restrictions = no
disable spoolss = yes
host msdfs = no
strict allocate = no
wide links = no
bind interfaces only = yes
interfaces = lo br0 192.168.31.1/255.255.255.0
use sendfile = yes
map archive = no
map hidden = no
map read only = no
map system = no
store dos attributes = no
dos filemode = yes
oplocks = yes
level2 oplocks = yes
kernel oplocks = no
wins support = yes
os level = 255
domain master = yes
local master = yes
preferred master = yes
enable core files = no
deadtime = 30
load printers = no
printable = no
max protocol = SMB2
smb encrypt = disabled
min receivefile size = 16384
passdb backend = smbpasswd
smb passwd file = /etc/samba/smbpasswd
I see only [global] section, without [shares] information.

The drive has 2 ext4 partitions, mounted as
/tmp/mnt/Main
/tmp/mnt/My_Passport

So I have to manually add these lines at the bottom of smb.conf to have them shared

[Main]
comment = comment
path = /tmp/mnt/Main
writeable = yes

[My_Passport]
comment = comment
path = /tmp/mnt/My_Passport
writeable = yes
 
You said you are running the "latest version" of the firmware. What version exactly is that?

Do you have any custom scripts or configs?
 
The problem may be that your Windows PC can't browse for shares as it once did. Search with \\routerip Recommend enable SMB2 only.

The file you edited is located in memory and is configured on reboot. You should be able to use a post config file to make changes to the default on startup.

Sent from my SM-T380 using Tapatalk
 
You said you are running the "latest version" of the firmware. What version exactly is that?

Do you have any custom scripts or configs?

It's asuswrt merlin 384.12

Only amtm for entware, transmission, and spdMerlin..

Forgot to mention that this issue happened after a factory reset through webui
 
I'd start by disabling the custom scripts and configs option in the router's GUI and rebooting. That will narrow down the cause of the problem.
 
@ColinTaylor

I've disabled JFFS Custom scripts and configs, reboot, toggle enable share off/on, unplug/plug the drive, but still not working.

It's mounted and I can access it through SSH
Code:
Admin@RT-AC68U-83E8:/tmp/mnt# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=127736k,nr_inodes=31934,mode=755)
proc on /proc type proc (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda2 on /tmp/mnt/Main type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)
/dev/sda1 on /tmp/mnt/My_Passport type tntfs (rw,nodev,relatime,uid=0,gid=0,umask=00,allow_utime=0022,nls=utf8,min_prealloc_size=64k,max_prealloc_size=128M,readahead=1M,user_xattr,case_sensitive,nocache,fail_safe,hidden=show,dotfile=show,protected_system=show,errors=continue,mft_zone_multiplier=1)
Admin@RT-AC68U-83E8:/tmp/mnt#
 
Very strange. Can you try turning off guest access and sharing some individual folders.

What do you get from these commands:

Code:
nvram get st_samba_force_mode
nvram get st_samba_mode
 
Very strange. Can you try turning off guest access and sharing some individual folders.

What do you get from these commands:

Code:
nvram get st_samba_force_mode
nvram get st_samba_mode

Code:
nvram get st_samba_force_mode
4
nvram get st_samba_mode
1

EDIT:
Turning off guest access did help. Weird.

Anyway, I works now.
Thanks for the help
 
Last edited:

Sign Up For SNBForums Daily Digest

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