This is another modified version of Western Digital’s resetButtonAction.sh script but this one does everything the original script does as well as enabling SSH access
I highly recommend replacing Western Digital’s default script with this one as it at least gives you some sort of safety net in the event you run into problems down the road and SSH is NOT enabled
-
Download the script from http://www.mediafire.com/?wji7egd4j752j6i
-
Unzip resetwithssh.zip
-
Enable SSH access on your MyBookLive by going to http://mybooklive/UI/ssh
-
Windows users download WinSCP from http://winscp.net/download/winscp510setup.exe
3a) Mac users download CyberDuck from http://cyberduck.ch/Cyberduck-4.2.1.zip -
Windows users start WinSCP and enter the login info…Host: mybooklive Username: root Password: welc0me
4a) Mac users start CyberDuck to login to the MyBookLive using SFTP Host: mybooklive Username: root Password: welc0me Port: 22 -
Copy resetButtonAction.sh that you unzipped in step 2 to /usr/local/sbin and when asked, overwrite the existing file
-
Done
Western Digital’s original script
#!/bin/sh
#!/bin/sh
#
# © 2010 Western Digital Technologies, Inc. All rights reserved.
#
# resetButtonAction.sh
#
# This is called by resetbtnd whenever the reset button has met the criteria for a reset. This script implements the actions for the reset button.
#
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
logger "reset button pressed, invoking reset actions"
# remove owner password
owner=`getOwner.sh`
modUserPassword.sh ${owner}
# set root password back to default
echo "root:welc0me" | chpasswd
# set network to dhcp
setNetworkDhcp.sh
reboot
Modified Script
#!/bin/sh
#!/bin/sh
#
# © 2010 Western Digital Technologies, Inc. All rights reserved.
#
# resetButtonAction.sh
#
# This is called by resetbtnd whenever the reset button has met the criteria for a reset. This script implements the actions for the reset button.
#
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
logger "reset button pressed, invoking reset actions"
#enable ssh
echo "enabled" > /etc/nas/service_startup/ssh
# remove owner password
owner=`getOwner.sh`
modUserPassword.sh ${owner}
# set root password back to default
echo "root:welc0me" | chpasswd
# set network to dhcp
setNetworkDhcp.sh
reboot