DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-02-08 15:48:07

shecky25
Member
Registered: 2008-01-16
Posts: 6

create SvcwRsync user

From BLBrown's website I pulled these instructions.

[create SvcwRsync user (required to SSH into DNS-323 as that username)]
- putty
   - echo "root::0:0:99999:7:::" >>/etc/shadow
   - passwd
   - /mnt/HD_a2/fun_plug.d/bin/store-passwd.sh
   - vi /mnt/HD_a2/fun_plug.d/bin/change-homedir.sh
      - add fun_plug.d/
   - /mnt/HD_a2/fun_plug.d/bin/change-homedir.sh root
   - adduser SvcwRsync
      (pw is blank)
   - /mnt/HD_a2/fun_plug.d/bin/change-homedir.sh SvcwRsync
   - /mnt/HD_a2/fun_plug.d/bin/store-passwd.sh
   - vi /mnt/HD_a2/fun_plug.d/start/telnetd.sh
      - exchange comments on LOPT

Couple of questions.

1. When I vi into the homedir.sh file it says for me to add fun_plug.d/ . How do I do that and what exactly am I doing?

2. I manage to edit the telnetd.sh file so it asks for username and password. When logged in I started dropbear and as the program starts it is denied access to make the directories needed. I am also not allowed to make directories. Obviously I am new to this and where I think my mistake is, is that I do not have root access or wrong permissions?

Thanks

Last edited by shecky25 (2008-02-08 15:48:31)

Offline

 

#2 2008-02-08 16:20:53

blbrown
Member
Registered: 2007-11-02
Posts: 88
Website

Re: create SvcwRsync user

1. When you use the 'vi change-homedir.sh' command, you'll want to change line 4 (starts with 'home_dir=') to include the fun_plug.d directory in the path.  This is actually your own preference, but the rest of my rough notes assume you've used this directory as your home directory.  In other words, I preferred to have my root user's home directory underneath the fun_plug.d/ directory in order to keep Volume_1/ as 'clean' as possible.  (Volume_1/ is the SMB share that is equivalent to /mnt/HD_a2/, so my suggested home_dir= path ends up being /mnt/HD_a2/fun_plug.d/home).  The vi commands to do this are:

vi /mnt/HD_a2/fun_plug.d/bin/change-homedir.sh
{down} {down} {down}
w w w w w
{right}
i
fun_plug.d/
{esc}
:wq

Clear as mud yet?  When I convert my rough notes to proper web instructions I'll try to clear up these issues better.


2. Hm, I'm assuming you mean you changed the 4th and 5th lines of start/telnetd.sh to read:
#LOPT="-l ${BINDIR}/sh"
LOPT="-l ${BINDIR}/login"
If you've done that, then when you telnet in you should got the login: prompt.  At the login prompt, use 'root' as the username and then type the password you used with the 'passwd' command.  If that is successful, then you should be logged in as root which has all privileges necessary.

For dropbear to work you need to follow the rest of the instructions in the other sections (especially [convert the SSH public/private key pair into something dropbear can use]).

But maybe I'm missing something here.  Can you give the exact error you get and the steps you take to repeat it?  For example, are you trying to SSH into the DNS-323 from PuTTY on a Windows machine?  Or are you just running the start/dropbear.sh script and getting the error?

Last edited by blbrown (2008-02-08 16:25:21)

Offline

 

#3 2008-02-09 03:36:20

shecky25
Member
Registered: 2008-01-16
Posts: 6

Re: create SvcwRsync user

I thought I had a grasp of what I was doing, but I am back here stuck again.

I generated (3) files with puttygen. Using windows explorer i copied the (3) files into the dns.

I telnet into the dns with root accesses.

next I try this:


~ # mv /mnt/HD_a2/ben_dns323_private_key.openssh /mnt/HD_a2/fun_plug.d/etc/dropbear
~ # dropbearconvert openssh dropbear /mnt/HD_a2/fun_plug.d/etc/dropbear/ben_dns323_private_key.openshh /mnt/HD_a2/fun_plug.d/etc/dropbear/dropbear_rsa_host_key
Error: Unable to open key file
Error reading key from '/mnt/HD_a2/fun_plug.d/etc/dropbear/ben_dns323_private_key.openshh'


I see that the file was moved, but when I ls whats in the /etc/ directory there is no dropbear/ folder

I try to go into the folder and make it but no dice:

/mnt/HD_a2/fun_plug.d # ls
bin    etc    home   lib    log    start
/mnt/HD_a2/fun_plug.d # cd etc
/mnt/HD_a2/fun_plug.d/etc # ls
dropbear                       lighttpd.conf-with-php-sample
funplug-version                php.ini
inetd.conf-sample              profile
lighttpd.conf-sample           rsyncd.conf-sample
/mnt/HD_a2/fun_plug.d/etc # cd dropbear
-sh: cd: can't cd to dropbear
/mnt/HD_a2/fun_plug.d/etc # mkdir dropbear
mkdir: cannot create directory 'dropbear': File exists
/mnt/HD_a2/fun_plug.d/etc #


any ideas? thanks again.

Offline

 

#4 2008-02-11 01:01:11

blbrown
Member
Registered: 2007-11-02
Posts: 88
Website

Re: create SvcwRsync user

Yep, in your first command when you did:

~ # mv /mnt/HD_a2/ben_dns323_private_key.openssh /mnt/HD_a2/fun_plug.d/etc/dropbear

you ended up moving the key into a _file_ named dropbear (since the directory evidently did not exist yet on your system).  Try the following commands to move the dropbear 'file' (which is really your key) back to a key and create the dropbear folder:

mv /mnt/HD_a2/fun_plug.d/etc/dropbear /mnt/HD_a2/fun_plug.d/etc/ben_dns323_private_key.openssh
mkdir /mnt/HD_a2/fun_plug.d/etc/dropbear
mv /mnt/HD_a2/fun_plug.d/etc/ben_dns323_private_key.openssh /mnt/HD_a2/fun_plug.d/etc/dropbear/ben_dns323_private_key.openssh

I'm guessing that my instructions were written after I had started the dropbear daemon, which must automatically create that directory...

Last edited by blbrown (2008-02-11 01:01:41)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB