BIG MISTAKE - proftpd.passwd

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,516
Location
A Coruña, Spain
Hi,

i just made a big error... ive deleted proftpd.passwd file

Ive tryed to find aroun the drive if there was a backup copy but i didnt founded any...

Ive ntoice that there is a ftp.passwd file into every user backup that i have so i should exctract each line from each user ftp.passwd file

but the file backuped is like

admin=passwd=$pFNxF24yyEcOc3Qh0du2N0&path=/home/admin/&type=system

and the proftpd.passwd file is

admin:$1$4899qmK6NL7S.vKbPlaKA1:1004:1005:system:/home/admin:/bin/false

so, im sure there is a way to restore the backuped line to the proftpd.passwd line but i dunno how the restore script work on that file and i would like to restore all the backups (ive a backusp of each user so i can restore the entire file but i dont wanna restore each total user for dont have file/db restore).

can anyone help me solve this trouble with a perl line or with commands line by line or what ever..

thanks a lot to everyone who at least try ^^

Best regards
 
Oh thanks a lot that was amazing!

Yeah it worked for "basic" accounts but ofc dont work for specify users account like user2@domain user3@domain etc

but, i really wanna say thank you cause at least this solved a part of the mistake and i appreciate ^^

If anyone else have other ideas for restore all accounts should be the best solution at all

Thanks again scsi it worked perfect for the basic user ftp login
 
i was thinking right now, while checkin in detail that script... that should work for the backup files too... just need to be adapted i think...

ive no the knowledge to modify that but, if someone have and dont have something better to do.. please help ^^
 
anyone knwo what is the file that directadmin use to start user restor from admin level? so i can find the command line for restore just ftp.passwd section.

can someone help please?
 
anyone knwo what is the file that directadmin use to start user restor from admin level? so i can find the command line for restore just ftp.passwd section.

can someone help please?

User backup file username.tar.gz contains backup directory.
Unpack it by executing
PHP:
tar xvfz username.tar.gz backup
cd backup
For each domain (example.com) there will be corresponding directory containing ftp.passwd file
PHP:
cat example.com/ftp.passwd
Hope that helps
 
hi,

i know that every backup have that file but in the first post i was asking for a script to restore the file cause is compiled in a different way then ftp.passwd.

but now is no more urgent

thanks for your reply
 
Back
Top