[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is it possible to create multiple users?



Le Sat, 6 Sep 2008 12:20:59 +0100,
Chris Lamb <chris@chris-lamb.co.uk> a écrit :


> To this end, we add a custom initramfs hook:
> 
>  $
> DIR="config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom"
> $ mkdir -p $DIR $ cat > $DIR/90moreusers << EOF
>  #!/bin/sh
>  chroot /root adduser -q user2 --disabled-password --gecos ''
>  echo "user2:password" | chroot /root chpasswd
>  EOF
>  $ chmod +x $DIR/90moreusers
> 
> We also need to refresh the initramfs:
> 
>  $ cat > config/chroot_local-hooks/99refresh-initramfs << EOF
>  #!/bin/sh
>  update-initramfs -u -k all
>  EOF
> 
> Then build using lh_build as normal. See the chpasswd manpage for
> details on how to use encrypted passwords here.

thx, it's exactly what I need!

mil


Reply to: