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