setting up a couple of user accounts
On Wed, Dec 19, 2007 at 06:41:29AM -0700, John Schmidt wrote:
> Hi,
>
> I have some software that I would like installed on a LiveCD for demonstration
> purposes. The installation requires the addition of a couple of user
> accounts with the software in those accounts.
>
> Is there a way to add additional users?
>
> Using the old make-live, I would create a separate chroot and do my
> installation there, and then use the following comand:
>
> make-live --include-chroot /home/jas/debianliveSCIRun/ --hook="chown 999:99
> 9 /home/casper -R"
>
> I looked through the exmple scripts for debian-live but didn't see anything,
> any points to FAQs or something I perhaps overlooked would be appreciated.
Add hook scripts in config/chroot_local-hooks . Those scripts are run in
the chroot itself after everything was installed. You can use something
of the sort of:
#!/bin/sh
# add some users:
adduser whatever --nopassword
echo whatever:thepassword | chpasswd
Alternatively, put a list of: 'username password' lines in
config/chroot_local-includes/users_to_add
and use a hook script of the sort of:
#!/bin/sh
# add some users:
cat /users_to_add | while read user passowrd; do
adduser user --nopassword
echo user:password | chpasswd
done
rm /users_to_add
##############
The above are completely untested.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Reply to: