Systematic Architecture [EN]
The blog on systems development/architecture, to be a beautiful, artistic one.
Sunday, 15 May 2016
Buffalo LinkStation as a Server (BaaS)
Buffalo LinkStation as a Server (BaaS) ====================================== You can use Baffalo LinkStation as a Linux server because it is based on Linux. Download `acp_commander.jar` ----------------------------- http://downloads.buffalo.nas-central.org/TOOLS/ALL_LS_KB_ARM9/ACP_COMMANDER/ Run the following commands --------------------------- ```bash IP=
ADMIN_PW=
ROOT_PW=
java -jar acp_commander.jar -t $IP -ip $IP -pw $ADMIN_PW -c "(echo $ROOT_PW ; echo $ROOT_PW) | passwd" java -jar acp_commander.jar -t $IP -ip $IP -pw $ADMIN_PW -c "sed -i 's/UsePAM yes/UsePAM no/g' /etc/sshd_config" java -jar acp_commander.jar -t $IP -ip $IP -pw $ADMIN_PW -c "sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/sshd_config" java -jar acp_commander.jar -t $IP -ip $IP -pw $ADMIN_PW -c "/etc/init.d/sshd.sh restart" ``` If you get the following error, ```bash Trying to authenticate EnOneCmd... ACP_STATE_OK Trying to authenticate with admin password... ACP_STATE_OK >sed -i 's/UsePAM yes/UsePAM no/g' /etc/sshd_config OK (ACP_STATE_OK) Changeing IP: ACP_STATE_PASSWORD_ERROR Please note, that the current support for the change of the IP is currently very rudimentary. The IP has been set to the given, fixed IP, however DNS and gateway have not been set. Use the WebGUI to make appropriate settings. ``` check the variables set without any quotes. It should be successful as follows ```bash Trying to authenticate EnOneCmd... ACP_STATE_OK Trying to authenticate with admin password... ACP_STATE_OK OK (ACP_STATE_OK) Changeing IP: ACP_STATE_PASSWORD_ERROR Please note, that the current support for the change of the IP is currently very rudimentary. The IP has been set to the given, fixed IP, however DNS and gateway have not been set. Use the WebGUI to make appropriate settings. ``` BTW changeing is a typo and sort of weird English... If you have the error still, run the following ```bash $ java -jar acp_commander.jar -t $IP -ip $IP -pw $ADMIN_PW -s ``` and run a command. This is one liner so that you ought to run the above again per a command. Go with ssh ----------- ```bash $ ssh -l root
``` Shared folders are under `/mnt/array1`. Misc ---- `acp_commander.jar` can run commands for LinkStation. You can list commands with `-h` ```bash java -jar acp_commander.jar -h ``` a result ``` $ java -jar acp_commander.jar -h there seems to be no existing prefs, write default values ACP_commander out of the nas-central.org (linkstationwiki.net) project. Used to send ACP-commands to Buffalo linkstation(R) LS-PRO. WARNING: This is experimental software that might brick your linkstation! Version 0.4.1 (beta) Usage: acp_commander [options] -t target options are: -t target .. IP or network name of the Linkstation -m MAC ... define targets mac address set in the ACP package *), default = FF:FF:FF:FF:FF:FF. -na ... no authorisation, skip the ACP_AUTH packet. You should only use this option together with -i. -ba ... use bug/bufferoverflow on LS to bypass usual password authentication. Standard until acp_commander 0.4. -pw passwd . your LS admin password. If not given, but required you'll be asked for it. -i ID ... define a connection identifier, if not given, a random one will be used. (With param MAC the senders MAC address will be used.) Successfull authenitfications are stored in conjunction with a given connection ID. So you may reuse a previously used one. Using a lot of different id's in a chain of commands might cause a lot of overhead at the linkstation. -p port ... define alternative target port, default = 22936 -b localIP.. bind socket to local address. Use if acp_commander can not find your linkstation (might use wrong adapter). -f ... find linkstation(s) by sending an ACP_DISCOVER package -o ... open the linkstation by sending 'telnetd' and 'passwd -d root', thus enabling telnet and clearing the root password -c cmd ... sends the given shell command cmd to the linkstation. -s ... interactive shell -cb ... clear \boot, get rid of ACP_STATE_ERROR after firmware update output of df follows for control -ip newIP... change IP to newIP (basic support). -save ... save configuration -load ... load configuration -blink ... blink LED's and play some tones -savepref... write out acp_commander.preferences (XML) for editing. -loadpref... load acp_commander.preferences (XML) and store values in default place. -gui nr ... set Web GUI language 0=Jap, 1=Eng, 2=Ger. -addons ... install addons.tar from local or linkstationwiki. -diag ... run some diagnostics on LS settings (lang, backup). -emmode ... Linkstation reboots next into EM-mode. -normmode .. Linkstation reboots next into normal mode. -reboot ... reboot Linkstation. -shutdown .. shut Linkstation down. -d1...-d3 .. set debug level, generate additional output debug level >= 3: HEX/ASCII dump of incoming packets -q ... quiet, surpress header, does not work with -h or -v -h | -v ... extended help (this output) -u ... (shorter) usage *) this is not the MAC address the packet is sent to, but the address within the ACP packet. The linkstation will only react to ACP packets if they carry the correct (its) MAC-address or FF:FF:FF:FF:FF:FF This program is the result of the work done at nas-central.org (linkstationwiki.net), which is not related with Buffalo(R) in any way. Experimental software, use with care, it might brick your Linkstation! If this helps you, please consider donating to www.linkstationwiki.net $ ```
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)