General NAS-Central Forums

Welcome to the NAS community
It is currently Thu Sep 21, 2017 12:05 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon Aug 19, 2013 9:21 am 
Offline

Joined: Mon Aug 19, 2013 8:51 am
Posts: 1
I have successfully got root access on my new 2big NAS 4TB with Lacie OS 3.0 (3.0.5.6)

It's quite easy, no disassembling required.

1. Enable SFTP in the web interface
2. Open a SFTP connection to the box using your admin account
3. Change directory to the Admin: cd Admin
4. Create a link for default.runlevel file: symlink /etc/initng/runlevel/default.runlevel default.runlevel
5. Create a link for shadow file: symlink /etc/shadow shadow
6. Create a link for unicorn.sharing.ssh.conf file: symlink /etc/unicorn/unicorn_conf/unicorn.sharing.ssh.conf unicorn.sharing.ssh.conf
7. You can close SFTP connection now
8. Open the web file manager in your browser and navigate to the Admin folder
9. Right click on default.runlevel and select edit in source editor, uncomment sshd entry, save
10. Right click on unicorn.sharing.ssh.conf and select edit in source editor, enable ssh by replacing false by true (enabled: true), save
11. Reboot
12. Open the web file manager in your browser and navigate to the Admin folder
13. Right click on shadow and select edit in source editor, replace root hash by admin hash, save

Now you can connect to the port 2222 using root login and admin's password. Shadow file will be overwritten on next reboot, so next time your need to edit shadow again (so, do not remove that symlink) or use key authentification for permanent solution.


Last edited by graycrow on Mon Aug 19, 2013 4:08 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Aug 19, 2013 11:06 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
Nice! Stickied.


Top
 Profile  
 
PostPosted: Tue Aug 20, 2013 11:31 pm 
Offline

Joined: Thu Jun 20, 2013 12:22 pm
Posts: 12
Great tutorial, but I am experiencing a slight problem with public/private key authentification.
I have inserted my public key as I would have in any authorized_keys file, but my NAS falls back to password authentification.

Does the key need to be in a specific format?

Here are the contents of my file (without any newlines in the keys segment):
Code:
_config:
    enabled: true
    port: 2222
    chroot_directory: '/'
    authorized_keys: 'ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEArJYkNKv8ZhFgDT4j94BjwZHhhf/d0FFGAf8ey1/RYjtdGHdLLaz0BkQCRHFI8cm4nWKQwGlziwjx8cAHaw2ITCGhfdZfT6+VtFwgTLZm/yX+mheE482iIYk6Yj5u2UiBGbGA4+gjKzABJwZrKYBnX1lDv88mxBUPepkW5Wwo2U0= rsa-key-20130303'


Top
 Profile  
 
PostPosted: Wed Oct 16, 2013 4:06 pm 
Offline

Joined: Thu Oct 10, 2013 5:50 pm
Posts: 1
Many thanks graycrow, worked perfectly on my 5big NAS Pro with 3.1.4.4 firmware.
With regard to public key authentication I changed my config line to
authorized_keys: '~/.ssh/authorized_keys'
I don't think I rebooted after that change, if it breaks after the next one I'll revise.
I created the directory .ssh (in /root) and also locally, where I generated keys with ssh-keygen (and just pressed enter several times for a default key with no passphrase). When attempts to use ssh-copy-id failed I just copied the public key file to the NAS .ssh directory and renamed it to authorized_keys. After much confusion, and a lack of error messages, I changed the permissions on the remote directory,
chmod 700 .ssh
Success! slogin -i ~/.ssh/id_rsa root@IP -p 2222
(where id_rsa is my private key, locally)


Top
 Profile  
 
PostPosted: Thu Nov 28, 2013 11:04 am 
Offline

Joined: Tue Nov 26, 2013 8:38 pm
Posts: 11
I'm sorry for this question, but I'm new to this matter:

How do I perform this step:
"Create a link for default.runlevel file: symlink /etc/initng/runlevel/default.runlevel default.runlevel"

on a Win VISTA PC with WinSCP with a CLOUDBOX? The (S)FTP Connection is working, I can see
the shared files, but want means "symlink ..?". I don't know what to do...

Thanks in advance.


Top
 Profile  
 
PostPosted: Thu Nov 28, 2013 12:04 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
On WinSCP do Files->Custom Commands->Enter, and enter the command
Code:
symlink /etc/initng/runlevel/default.runlevel default.runlevel


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 10:27 am 
Offline

Joined: Tue Nov 26, 2013 8:38 pm
Posts: 11
Ah! Holy Osram! Thanks a Lot!


Top
 Profile  
 
PostPosted: Sun Dec 01, 2013 11:07 pm 
Offline

Joined: Fri Nov 22, 2013 11:21 pm
Posts: 14
graycrow wrote:
I have successfully got root access on my new 2big NAS 4TB with Lacie OS 3.0 (3.0.5.6)

It's quite easy, no disassembling required.

1. Enable SFTP in the web interface
2. Open a SFTP connection to the box using your admin account
3. Change directory to the Admin: cd Admin
4. Create a link for default.runlevel file: symlink /etc/initng/runlevel/default.runlevel default.runlevel
5. Create a link for shadow file: symlink /etc/shadow shadow
6. Create a link for unicorn.sharing.ssh.conf file: symlink /etc/unicorn/unicorn_conf/unicorn.sharing.ssh.conf unicorn.sharing.ssh.conf
7. You can close SFTP connection now
8. Open the web file manager in your browser and navigate to the Admin folder
9. Right click on default.runlevel and select edit in source editor, uncomment sshd entry, save
10. Right click on unicorn.sharing.ssh.conf and select edit in source editor, enable ssh by replacing false by true (enabled: true), save
11. Reboot
12. Open the web file manager in your browser and navigate to the Admin folder
13. Right click on shadow and select edit in source editor, replace root hash by admin hash, save

Now you can connect to the port 2222 using root login and admin's password. Shadow file will be overwritten on next reboot, so next time your need to edit shadow again (so, do not remove that symlink) or use key authentification for permanent solution.


Thanks, it worked on my cloudbox..
how do i get admin hash?

/edit > SOLVED ! thanks


Top
 Profile  
 
PostPosted: Sat Feb 01, 2014 7:31 pm 
Offline

Joined: Tue Nov 26, 2013 8:38 pm
Posts: 11
Mijzelf wrote:
On WinSCP do Files->Custom Commands->Enter, and enter the command
Code:
symlink /etc/initng/runlevel/default.runlevel default.runlevel
All I get is a very long error message which says something like "SFTP-5 does not support commands", "Lets start a shell on server" and finally "Server refused to start shell/command.".

Please help me...

(I stopped working on this topic for a while because it was too frustrating. But now I'm back. thanks for your support.)


Top
 Profile  
 
PostPosted: Thu Feb 06, 2014 2:26 pm 
Offline

Joined: Thu Feb 06, 2014 2:17 pm
Posts: 3
akahata wrote:
Mijzelf wrote:
On WinSCP do Files->Custom Commands->Enter, and enter the command
Code:
symlink /etc/initng/runlevel/default.runlevel default.runlevel
All I get is a very long error message which says something like "SFTP-5 does not support commands", "Lets start a shell on server" and finally "Server refused to start shell/command.".

Please help me...

(I stopped working on this topic for a while because it was too frustrating. But now I'm back. thanks for your support.)


Hello, about a week ago I had the same problem on LaCie 5big NAS PRO. I solved it from the command line in Ubuntu.
Regards, John


Top
 Profile  
 
PostPosted: Fri Mar 07, 2014 2:27 pm 
Offline

Joined: Thu Mar 06, 2014 10:51 pm
Posts: 1
Hey has anyone gotten this to work on a nas running 3.1.4.7?

or how to find the older OS version so i can root it Lacie has removed it from the site.


Top
 Profile  
 
PostPosted: Tue Mar 11, 2014 12:22 pm 
Offline

Joined: Thu Feb 06, 2014 2:17 pm
Posts: 3
nathanwoerheide wrote:
Hey has anyone gotten this to work on a nas running 3.1.4.7?

or how to find the older OS version so i can root it Lacie has removed it from the site.



I use OS ver. 3.1.4.7 and above procedure from graycrow works. Only I was not able to enter commands via WinSCP so I used the command line in Linux.


Top
 Profile  
 
PostPosted: Fri Apr 11, 2014 9:53 pm 
Offline

Joined: Fri Apr 11, 2014 9:46 pm
Posts: 3
Thanks for this awesome guide! It worked for me running firmware 3.1.4.6

Damn thing gave me a heart attack though when I rebooted. I couldn't see my shares from SFTP and the file browser gave me errors when clicking on the shares. The shares screen had errors next to each share saying Volume 1 was not active... Turns out it was just checking the file system and everything was fine after 5 minutes :roll:


Top
 Profile  
 
PostPosted: Mon Aug 25, 2014 6:59 pm 
Offline

Joined: Mon Aug 25, 2014 6:56 pm
Posts: 1
I tried to use this procedure on a 5big NAS Pro with software ver. 3.1.4.8 with no succes. I got stuck at step 3 since I can only see the shares I created on the top level.
Any ideas, anyoane?
Thanks!


Top
 Profile  
 
PostPosted: Mon Aug 25, 2014 7:33 pm 
Offline

Joined: Fri Apr 11, 2014 9:46 pm
Posts: 3
You could try using one of your other shares. I don't think the location is important. The sym links just needs to be accessible from the web file manager.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group