[BusyBox] /etc/shadow question--More Ideas

Nick Fedchik fnm at fusion.ukrsat.com
Mon Feb 10 01:39:03 UTC 2003


On Sat, 8 Feb 2003, Gene Cumm wrote:
>> Patch bb-shadow-path.patch is availiable at
>> http://www.fedchik.org.ua/linux/busybox/
...
>What about using a tarball, if your busybox is so equipped?  You could
>keep the old files in the ramdisk and store your newer files in a
>tarball, unarchiving during the boot sequence.  I think this is a more
>robust idea than 2 ramdisks.  It will allow you to use less ram or
>easily migrate to another system other than ramdisks easily.
>Another solution is to have a barebones etc directory on the root
>ramdisk and a good ramdisk mounted to etc by init.

My goal is to store all configuration files locally at busybox-powered host.
That's because I frequently update bb-based image, then upload it to my host
and reboot it.
Now I use two images:
1) bb-based rootfs (minix), mounted by kernel after boot.
2) per-host configuration image (minix), mounted to /etc/local dir.

Using my patch is to able relocate /etc/shadow to /etc/local/shadow.
For most cases, /etc/shadow is need no at boot time and before login.

That's why I keep /etc/passwd untouched, also I need no to add new users at
bb-powered hosts. So I move shadow passwords db and some other files
(host-dependend) to config image, and load config image by dd from /etc/rcS
to the second ramdisk, then mount ramdisk to /etc/local. Except the shadow
db, all another files are linked by softlinks from /etc to /etc/local.
I wrote 'sysconfig' script with 'save' and 'restore' params. To save
per-host configuration, the script mount disk as rw and dump config ramdisk
to file, then umount disk.

Related TODO:
- add option to make 'silent' dd
- add option to change path of the 'passwd' file

Has anyone another ideas or comments?

-- 
Nick Fedchik, FNM3-RIPE(UANIC)
Internet Dept./ISP UkrSat, Kiev, Ukraine



More information about the busybox mailing list