HITB Buffalo Linkstation Pro Duo – Part 1

By | July 2, 2011

Update: Dec 2019
-this tutorial may outdated. If you stuck, please read comments below.
-thanks to for highlighting this tools: https://github.com/CrashSerious/Buffalo-220-NAS

With stock firmware, there’s no ssh/telnet capability in the box. We are going to “open” it.

Goal 1: Open the Stock Firmware

Get ACP Commander from here. This is the most useful tools ever created by the community to gain root access. You will need a Java JRE to be installed in your machine.

Verify that current admin password is work.

java -jar acp_commander.jar -t NAS_IP -ip NAS_IP -pw Youradminpassword -c "ls /"

Let’s the fun begin. First we’ll issue a new SSH password for root user

java -jar acp_commander.jar -t NAS_IP -ip NAS_IP -pw Youradminpassword -c "(echo newrootpass;echo newrootpass)¦passwd"

Then we’ll allow root to login using plaintext

java -jar acp_commander.jar -t NAS_IP -ip NAS_IP -pw Youradminpassword -c "sed -i 's/UsePAM yes/UsePAM no/g' /etc/sshd_config"

After that, we’ll need to allow root to SSH

java -jar acp_commander.jar -t NAS_IP -ip NAS_IP  -pw adminpasswordhere -c "sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/sshd_config"


Restart SSH service

java -jar acp_commander.jar -t NAS_IP -ip NAS_IP -pw Youradminpassword -c "/etc/init.d/sshd.sh restart"


Now you will be able to SSH to your NAS box.

Notes:

  1. NAS_IP is your Linkstation IP address
  2. Youradminpassword is your Linkstation Web UI password
  3. Newrootpass is your new root account password (for ssh)
  4. Still works with the latest firmware (1.63)
  5. Or you can try the easy way 😛

Another way of doing this (to prevent error during copying above command) is to execute this bash script from your Linkstation.
1. Copy this file, http://dl.advanxer.com/stuff/NAS/open-ls.sh to your computer.
2. From your computer, browse to your NAS shared folder.
3. Copy and paste open-ls.sh file to /share folder.
4. Execute this command from your computer (replace $DISK with disk1 or array1):

java -jar acp_commander.jar -t NAS_IP -ip NAS_IP -pw Youradminpassword -c "sh -x /mnt/$DISK/share/open-ls.txt"

Loading