open_Netcenter Forum open_Netcenter Forum
Registrieren | FAQ | Suche | Mitgliederliste | Heutige Beiträge | Einloggen



Autor Thema: create ftp-user tutorial
raster
Lernt noch alles kennen
*
ID # 108



-234-234-23
  Erstellt am 15. Juni 2007 21:04 (#1)  |  Zitat Zitat   PN PN   E-Mail E-Mail
Well after seaching around for days, with alot of help from Geert, i finally figured out how to create ftp-users on vsftpd with the firmware from epias.

I will try to make this tutorial as easy to understand as possible but I assume you already installed epias' firmware.

Here goes:

1)
To make this even easier start by figuring out how many ftp-users you need, what you would call them and which permissions they should have.
Then go to the WD-Netcenter setup (http) and create one/some password protected folder /folders. Every folder-name is going to be an ftp-user with matching password. Create all the folders/ftp-users you need and type them down with there passwords and log out.

2)
Start - run - type ´telnet´ Hit Enter and type ´o your_netcenters_ip'
Log in as "root" and "WD_NetCenter"
Then type 'vsftpd' Hit Enter.
Log in with an ftp-program with "root" and "WD_NetCenter" then download the files etc/passwd, etc/shadow and etc/rc.start.
(you need to edit the files with a unix compatible editor like notepad++)

3) (In this example; I create a password protected folder called "hotdog" with the password "358".)
My 'passwd' looks like this:

root:x:0:0:root:/:/bin/sh
guest:x:35000:42000:guest:/:/bin/sh
hotdog:homRtFvnQB1J2:35006:42000:hotdog:/dev/null:/bin/false ("homRtFvnQB1J2" is the encrypted password "358" )

My ´shadow' looks like this:

root:rAmKPMUrQOp8I:12332:0:99999:7::: (where "rAmKPMUrQOp8I" is the encrypted password "WD_NetCenter" )

4)
Now you need to edit the file passwd like this: (only the line hotdog... is edited)

root:x:0:0:root:/:/bin/sh
guest:x:35000:42000:guest:/:/bin/sh
hotdog:x:35006:42000:hotdog:/shares/Main:/bin/false

I replaced the encrypted password for hotdog with an 'x' and replaced '/dev/null' with /shares/Main which then will become the root-folder for the user ´hotdog'. You can define any existing folder.

Then edit 'shadow' like this.

root:rAmKPMUrQOp8I:12332:0:99999:7::: (this line is the same. User "root" and encrypted password "WD_NeCenter" )
hotdog:homRtFvnQB1J2:12332:0:99999:7::: (Just added user 'hotdog' with his encrypted password "358" from 'passwd')

5)
Finally you need to edit your 'rc.start':
Just under "vsftpd &" put these lines

vsftpd &

cp /opt/etc/shadow /tmp
cp /opt/etc/passwd /tmp

chmod 644 /tmp/group
chmod 644 /tmp/passwd


6) Save and upload all 3 files to opt/etc/

Restart you netcenter cross your fingers and try to log in with you newly created users.
If it works you did it right and if it doesn't yor have to hold the "reset-button" on the back of the netcenter for 15 seconds. Then your netcenter will reboot without loading the rc.start file and you can correct the errors using the default user "root" with default password "WD_NetCenter". Only the first reboot after holding the reset-button will skip the rc.start.

I hope you will figure it out. - good luck!

/Rasmus

Beiträge: 18 | Mitglied seit: April 2007 | IP-Adresse: gespeichert



| open_Netcenter Web - Infos, Handhabung, Anleitungen | Boardregeln


Tritanium Bulletin Board 1.6
© 2010–2014 Tritanium Scripts