Lenovo ix4-300d SSH, root home directory and cronjobs
Couple of weeks ago I got my hands on 3 Lenovo ix4-300d storage boxes. These boxes are no longer produced and sometimes you can get them really cheap. First I had plans to use them as iSCSI storage for my home lab but the performance is not good enough. Therefore I decided to play around with one of the boxes to see what is possible.
I started searching in google about SSH access. Outcome was great blog post which contained a how to enable SSH.
In short just access this page http://[NAS IP]/manage/diagnostics.html and you can enable SSH and set a password for root.
Username : root
Password : soho + password (if password = VMware ==> sohoVMware )
As soon as you have successfully logged in you can change the password by simply running passwd like on any other linux. Afterwards the soho part in the beginning of the password is no longer required.
Next step is to create a home directory for the root user. You have to login to the web interface and go to shares. Now create a new share called root.
Attention: This way ensures that the folder is persistent. If you create it using ssh and mkdir it will be lost after reboot.
In your SSH session you can go to /nfs there you will find all your shares.
Next step is to change the home directory of the root user to /nfs/root.
You have to adjust the first line like on the screenshot below.
Save the file and reboot the NAS.
Restart using the Web interface.
Now login using SSH and check that root has now /nfs/root as home directory.
Limitation: SSH key authentication is not working due to the wrong permissions of the home directory.
In the new home directory you can now create folders and file on commandline they will be persistent only the main folder of the nfs has to be created using the web interface.
If you would like to run schedules jobs (cronjobs) you can edit the crontab file in /etc. It is also persistent.
I’m using the Lenovo 1×4-300d as backup system for my vServers.