Sven Rebhan wrote: > The correct way to solve this would be to add an option to useradd, > allowing to specify a passwd file other than /etc/passwd. > Afterwards patch the corresponding eclass to use this option. > Patches are welcome. ;-)
Looking at useradd.c at least four filenames should be changed; passwd, shadow, group and sgroup. The password db abstraction does allow easy changing of the file names, but home directory, skel directory, mail spool and probably more should also be changed, so maybe it makes sense to simply have useradd call chroot() according to an option early on in main()? //Peter
