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 2009-04-04 05:36:16

wrongway
New member
Registered: 2009-04-04
Posts: 4

Something I don't quite understand...

Okay, this is actually not a request for help getting my DNS-321 working, rather I want to know how something works...  I put together a bunch of users and groups in the WebUI, then I went into the shell and looked at passwd and groups and found that the users there did not match what I just entered.  The users were not assigned to the groups I had put them in and the default path pointed to /root/ftp rather than /mnt/HD_a2 which I found odd.  Why is this.  Are their two separate user databases?

One other thing, what does the store-passwd.sh script do, does it just write passwd and group to flash?

Any insight would be helpful, thanks!

Offline

 

#2 2009-04-04 11:09:23

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: Something I don't quite understand...

wrongway wrote:

One other thing, what does the store-passwd.sh script do, does it just write passwd and group to flash?

store-passwd.sh is a plain text shell script, you can look at it with the 'cat' command

Code:

/ # cat /ffp/sbin/store-passwd.sh
#!/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."

Looks like it copies, passwd, group, shadow, smbpasswd, ftp_tbl and ftpgroup
/sys/mtd1 and /sys/mtd2 are two areas of the flash NVRAM

I believe that the user's name in 'passwd' and 'smbpasswd' have to match, but I think
the samba password and the system logon password can be different .  I don't
know about the ftp_tbl and ftpgroup (ftp function is disabled on my DNS-323)

Last edited by mig (2009-04-04 12:15:02)


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#3 2009-04-05 02:31:17

wrongway
New member
Registered: 2009-04-04
Posts: 4

Re: Something I don't quite understand...

Thank you, what about the user store, are there more files than just passwd that covers that?

Offline

 

#4 2009-04-05 10:55:13

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: Something I don't quite understand...

wrongway wrote:

Thank you, what about the user store, are there more files than just passwd that covers that?

Please explain further, I'm really not sure what you mean by 'user store'?


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB