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.

#1 2011-08-25 14:16:40

cyber7
New member
Registered: 2011-08-25
Posts: 1

store-passwd.sh for a 4-disk system - works for me...

Hi Guys
After having a hell of a problem, not getting the password to save (/etc/password and shadow returns to default after reboot) and reading a bit on the net regarding this problem, I fixed it by changing the /etc/sbin/store-password.sh script.

I believe this will only anywhere, but if you do not have 4 disks in your system, you will get errors, which could be ignored.

Code:

#!/bin/sh

echo "Copying files to mtd1..."
mount -t minix /dev/mtdblock0 /sys/mtd1
cp -f /etc/passwd /sys/mtd1/.
cp -f /etc/group /sys/mtd1/.
cp -f /etc/shadow /sys/mtd1/.
cp -f /etc/samba/smbpasswd /sys/mtd1/.
#cp -f /etc/ftp_tbl /sys/mtd1/.
#cp -f /etc/ftpgroup /sys/mtd1/.
sync
umount /sys/mtd1
    
echo "Copying files to mtd2..."
mount -t minix /dev/mtdblock1 /sys/mtd2
cp -f /etc/passwd /sys/mtd2/.
cp -f /etc/group /sys/mtd2/.
cp -f /etc/shadow /sys/mtd2/.
cp -f /etc/samba/smbpasswd /sys/mtd2/.
#cp -f /etc/ftp_tbl /sys/mtd2/.
#cp -f /etc/ftpgroup /sys/mtd2/.
sync
umount /sys/mtd2

echo "Done."

echo "even more!"
cp -f /etc/passwd /mnt/HD_a4/.systemfile/AccountFile/.
cp -f /etc/passwd /mnt/HD_b4/.systemfile/AccountFile/.
cp -f /etc/passwd /mnt/HD_c4/.systemfile/AccountFile/.
cp -f /etc/passwd /mnt/HD_d4/.systemfile/AccountFile/.
cp -f /etc/shadow /mnt/HD_a4/.systemfile/AccountFile/.
cp -f /etc/shadow /mnt/HD_b4/.systemfile/AccountFile/.
cp -f /etc/shadow /mnt/HD_c4/.systemfile/AccountFile/.
cp -f /etc/shadow /mnt/HD_d4/.systemfile/AccountFile/.

I hope this gives pointers to more permanent scripts. (I will write them if I do get time to test...)

Kind regards
Aubrey Kloppers
South Africa

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB