chroot option for loginutils
Sergey Naumov
sknaumov at gmail.com
Thu May 12 20:27:44 UTC 2011
> I think this is rather easy to achieve:
> 1) change the paths in libbb.h
>
> #ifndef _PATH_PASSWD
> #define _PATH_PASSWD "/etc/passwd"
> #endif
> #ifndef _PATH_GROUP
> #define _PATH_GROUP "/etc/group"
> #endif
> #ifndef _PATH_SHADOW
> #define _PATH_SHADOW "/etc/shadow"
> #endif
> #ifndef _PATH_GSHADOW
> #define _PATH_GSHADOW "/etc/gshadow"
> #endif
>
> to what is suitable for you target system e.g $HOME/new_target/etc/passwd
>
> 2) compile a separate busybox binary to be used only during setup
> with all loginutils you need enabled and using bb's internal pwd_grp functions
> and name it pwd_setup
>
> 3) create the needed empty files on the target filesystem
> 4) create a script calling your pwd_setup binary to add users, groups, passwd etc
> in loop for all the users you like.
>
> Just an idea, but should work without adding code to bb.
>
> Ciao,
> Tito
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>
I wanted to be able to change the place of the directory dynamically,
but it can be achieved by symbolic link indeed. But, if it is shipped
in RO cdrom... Anyway I will try it, thanks.
More information about the busybox
mailing list