lixuewei / rt-n56u

Automatically exported from code.google.com/p/rt-n56u
0 stars 0 forks source link

Save manually updated /etc/passwd #1057

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I need to save manualy updated file /etc/passwd. I use it for creating users 
for proftp. But this file is replaced on router startup. It is somehow possible 
to store it manualy ?

Original issue reported on code.google.com by pavelbed...@gmail.com on 6 Nov 2013 at 4:40

GoogleCodeExporter commented 9 years ago
http://my.router/Advanced_SettingBackup_Content.asp
"Commit Internal Storage to Flash Memory Now"

Or run in console 
{{{
# mtd_storage.sh save
}}}

after you put the updated file to storage.

Original comment by Dr.Sydorenko.O on 6 Nov 2013 at 9:20

GoogleCodeExporter commented 9 years ago
I did that both. In router configuration. I also run mtd_storage save in 
terminal. After reboot the file is back to original.

Original comment by pavelbed...@gmail.com on 6 Nov 2013 at 12:55

GoogleCodeExporter commented 9 years ago
It seems it has something to do with ftp users defined in router configuration. 
Even if i have set build-in FTP to OFF. If I define new user (for example 
john), then /etc/passwd contains admin,nobody and john. I remove john then it 
contains only admin and nobody. Where this configuration comes from ? It is 
possible to rewrite it ? I cannot use these users in proftpd because 
/etc/passwd is missing some important attributes.

Original comment by pavelbed...@gmail.com on 7 Nov 2013 at 12:43

GoogleCodeExporter commented 9 years ago
Haven't understood your questions about /etc/passwd file... You should read 
some unix basics before modifying it, if you're asking such things!!

Anyway, there is a way to use your file after router startups.
So, do the following...

# cp /etc/passwd /etc/storage/passwd
# echo "[ -f /etc/storage/passwd ] && mount -o bind /etc/storage/passwd 
/etc/passwd" >> /etc/storage/started_script.sh

Original comment by d...@soulblader.com on 24 Nov 2013 at 11:21