NETWORK STORAGE · WINDOWS · HOW-TO
Enable SMB2 on a Buffalo LinkStation LS-WVL (firmware 1.75)
This is the procedure that restored Windows file sharing on LinkStation, a LinkStation LS-WVL (product string LS-WVL(KOUGYOKU)) running firmware 1.75. Other models may have different firmware, Samba versions and startup scripts. Verify those details before applying this procedure.
Modern Windows installations normally have SMB1 disabled. This firmware's Samba 3.6 can speak SMB 2.0.2, but Buffalo never turns that on. Every Samba start runs /usr/local/sbin/nas_configgen -c samba, which rewrites /etc/samba/smb.conf and leaves the dialect at SMB1. An edit to smb.conf alone disappears on the next restart. A firmware restore also puts the original /etc/init.d/smb.sh back, which is why a patch done years ago was gone.
The lasting fix is three lines in smb.sh, placed after nas_configgen, so the SMB2 settings are inserted again every time the config file is rebuilt.
Before you begin
This is an advanced, community workaround based on one successful LS-WVL / firmware 1.75 recovery, not an official Buffalo firmware update. Back up important files first. Keep this legacy NAS on a trusted local network; do not expose ACP, SSH or SMB to the internet. The temporary SSH setup below enables root password login and obsolete algorithms.
All IP addresses, MAC addresses, share names and passwords shown here are examples. Replace them with your own values. Copy the downloaded JAR to C:\Tools\acp_commander.jar. Verify that its banner says ACP Commander v0.6 (2021); older releases have different options.
What you need
- The LinkStation's IP, and the admin password for the built-in
adminaccount. ACP does not accept the password of a regular share user. The factory password ispassword. A firmware restore can keep the previous password instead of resetting it. acp_commander.jarfrom the ACP Commander repository (fork1000001101000/acp-commander, the jar that prints "ACP Commander v0.6 (2021)").- A Windows Java 21 runtime, not Java inside WSL.
ACP is a UDP conversation on port 22936. The NAS replies to the address inside the packet. Java running in WSL2 uses a 172.x address, and those replies never come back. Java running on Windows, bound to the LAN adapter that actually reaches the NAS, works.
Find that adapter from PowerShell:
Find-NetRoute -RemoteIPAddress 192.168.1.5In this example, the route uses Ethernet 192.168.1.100. A discover that is not bound to that address reports "Found 0 devices", because the host also has VMware, WSL, and VPN adapters.
1. Find the NAS and note its MAC
java -jar C:\Tools\acp_commander.jar -b 192.168.1.100 -fA successful discover looks like this:
| LinkStation | AA:BB:CC:DD:EE:FF | 192.168.1.5 | LS-WVL(KOUGYOKU) | 00488 | 1.750 |Keep the MAC. Command packets sent with the default FF:FF:FF:FF:FF:FF time out on this firmware (SocketTimeoutException on SPECIAL_CMD_EN_ONECMD) even though discover works. Pass the real MAC with -m.
Do not pass -ip. In this version of ACP Commander, -ip changes the LinkStation's address. It is not the client address. The client address is -b.
2. Confirm the admin password
$pw = 'the-admin-password'
java -jar C:\Tools\acp_commander.jar `
-t 192.168.1.5 -b 192.168.1.100 -m AA:BB:CC:DD:EE:FF -pw $pw -c "id"In PowerShell, keep the password in a single-quoted string. Characters such as ! and & are otherwise treated as syntax.
Success prints:
uid=0(root) gid=0(root)ACP_STATE_PASSWORD_ERROR, or an id line with no uid=0, means the password is wrong. Stop. Do not guess further. The password is changed in the web UI under Users/Groups, user admin, Edit User.
Each -c command must stay under about 210 characters. Longer edits are done over SSH after the next step.
3. Allow root to log in over SSH
sshd on firmware 1.75 is already installed and, on this unit, was already running. Root still could not log in:
| File | Stock setting |
|---|---|
/etc/sshd_config line 38 | PermitRootLogin no |
/etc/sshd_config line 56 | #PasswordAuthentication yes |
/etc/sshd_config line 74 | UsePAM yes |
/etc/passwd | root already has shell /bin/bash |
The daemon is /usr/local/sbin/sshd, OpenSSH 3.7.1p2. Its init script only rewrites the PermitUserEnvironment line, so the edits below survive /etc/init.d/sshd.sh restart.
Run these one at a time with the same java -jar ... -t -b -m -pw prefix:
cp -a /etc/sshd_config /etc/sshd_config.acp-bak
sed -i 's/^PermitRootLogin no/PermitRootLogin yes/' /etc/sshd_config
sed -i 's/^#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/sshd_config
sed -i 's/^UsePAM yes/UsePAM no/' /etc/sshd_config
sed -i 's/^#Port 22/Port 22/' /etc/sshd_configSet a root password (this used the same password as admin):
printf '%s\n' 'the-admin-password' 'the-admin-password' | passwd rootCheck it, then restart:
passwd -S root
/etc/init.d/sshd.sh restartpasswd -S should print root P plus today's date. P means a password is set. After the restart, ps shows /usr/local/sbin/sshd, and a TCP connection to port 22 returns:
SSH-2.0-OpenSSH_3.7.1p2From Windows, the current OpenSSH client will refuse this server unless the old algorithms are enabled:
ssh -o 'KexAlgorithms=+diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1' `
-o 'HostKeyAlgorithms=+ssh-rsa,ssh-dss' `
-o 'Ciphers=+aes128-cbc,3des-cbc' `
-o 'MACs=+hmac-sha1,hmac-md5' `
root@192.168.1.5Quote every -o value. PowerShell splits the commas if you do not. Log in as root.
4. Patch /etc/init.d/smb.sh
On firmware 1.75 the configure function ends like this. nas_configgen is line 53 and the matching fi is line 57:
/usr/local/sbin/nas_configgen -c samba
if [ $? -ne 0 ]; then
echo "$0 configure fail"
exit 1
fi
}The generated /etc/samba/smb.conf starts with [global] on line 1. Appending after that line puts the protocol settings inside the section. min protocol and max protocol are the Samba 3.6 names. server min protocol is Samba 4 syntax and is ignored here.
Back up the script, and insert the sed immediately after that fi. Over SSH as root:
cp -a /etc/init.d/smb.sh /etc/init.d/smb.sh.acp-bak
line=$(awk '/nas_configgen -c samba/{p=NR} p && !f && $0 ~ /^[[:space:]]*fi[[:space:]]*$/ {print NR; f=1; exit}' /etc/init.d/smb.sh)
[ -n "$line" ] || { echo "Configure block not found; stop."; exit 1; }
sed -n "1,${line}p" /etc/init.d/smb.sh > /tmp/smb.sh.new
printf '%s\n' \
" /bin/sed -i '1a\\" \
" min protocol = SMB2\\" \
" max protocol = SMB2' /etc/samba/smb.conf" >> /tmp/smb.sh.new
sed -n "$((line+1)),\$p" /etc/init.d/smb.sh >> /tmp/smb.sh.new
cp /tmp/smb.sh.new /etc/init.d/smb.sh
chmod 755 /etc/init.d/smb.shThe script must then contain this, still inside the configure function, before the closing }:
/usr/local/sbin/nas_configgen -c samba
if [ $? -ne 0 ]; then
echo "$0 configure fail"
exit 1
fi
/bin/sed -i '1a\
min protocol = SMB2\
max protocol = SMB2' /etc/samba/smb.conf
}The backslashes are real. They are inside single quotes, so the shell passes them to sed, and 1a appends the two protocol lines after line 1.
Apply it and read the result:
/etc/init.d/smb.sh restart
sed -n '1,8p' /etc/samba/smb.confThe head of smb.conf must be:
[global]
min protocol = SMB2
max protocol = SMB2
dos charset = CP932
unix charset = UTF-8
display charset = UTF-8
netbios name = LinkStation
server string = "LinkStation"/etc/init.d/smb.sh restart prints a few missing-key warnings (ad_dns, array2, usb_disk1, msdfs). Those are normal on this firmware. The line that matters is Starting SMB services:.
5. Prove Windows is speaking SMB2
net use \\192.168.1.5\IPC$ /user:admin *
net use \\192.168.1.5\IPC$ /deleteThe command completed successfully confirms authentication and connectivity, but does not by itself prove the negotiated dialect. While a share connection is still open, run PowerShell as administrator:
net use \\192.168.1.5\Backups /user:admin *
Get-SmbConnection | Select-Object ServerName,ShareName,Dialect,SignedUse your actual share name and an authorized share account. Look for dialect 2.0.2 on the connection to this NAS. If no connection appears, open a file on the share and run the command again.
Map a real share with its own user, for example \\192.168.1.5\Backups. Connect by IP. This Samba build often never appears under Network in Explorer.
If Windows says the password is wrong after SMB2 is confirmed, clear a stale saved login and try again:
cmdkey /delete:192.168.1.5What survives, and what does not
- The
smb.shedit survives a reboot. Samba regeneratessmb.conf, then the insertedsedputs the two lines back. - The
sshd_configedit survives ansshd.shrestart.sshdwas already started at boot on this unit. - Another firmware update or firmware restore replaces both files. Repeat sections 3 and 4.
- Changing
smb.confby hand does not survive the next Samba restart.
Backups from this run are /etc/sshd_config.acp-bak and /etc/init.d/smb.sh.acp-bak.
If a share still will not open
SMB2 only fixes the protocol refusal. It does not mount the disks. The web UI showing Storage: Not Available and Volumes: null means /mnt/array1 is not mounted, and the share will fail for that reason after SMB2 is working.
During the Samba restart this unit reported array1=raid0. RAID 0 stripes the two disks. Do not format, erase, delete the array, or create a new array to chase a share error. That destroys the stripe. Disk status belongs on System → Storage → Disks and System → Storage → RAID Array, read first, changed only after the RAID mode and the failed bay are known.
Newer Windows security requirements
Enabling SMB2 does not guarantee compatibility with every Windows configuration. Windows 11 24H2 and later can also enforce SMB signing; managed computers may require encryption. Use authenticated shares and investigate the exact Windows error before changing security settings. Do not enable SMB1 or guest access as a general fix.
See Microsoft's SMB signing guidance and Samba 3.6 protocol documentation.
Restore the original scripts
If the patch causes problems, use your existing root SSH session to restore the saved Samba script:
cp -a /etc/init.d/smb.sh.acp-bak /etc/init.d/smb.sh
/etc/init.d/smb.sh restartAfter confirming SMB access, restore the original SSH configuration to remove the temporary root-login changes:
cp -a /etc/sshd_config.acp-bak /etc/sshd_config
/etc/init.d/sshd.sh restartRestoring SSH settings can prevent a new root login. Keep the current session open until you finish checking the NAS. Do not overwrite your original backup files on a repeat run.
Sources and scope
Based on the owner's successful LinkStation LS-WVL firmware 1.75 procedure, with public example addresses and additional verification notes. Firmware-specific observations are not claims of testing on every LinkStation model. Samba and Microsoft documentation above explain protocol settings and current Windows compatibility.
Mango Juice Tech