Re: create own user in usb wheezy live
El 28/03/13 13:38, debmailist@Safe-mail.net escribió:
>> you are right, alternative if you want add *another* user, maybe you use
>> a live hooks
>> you can add config/include.chroot/lib/live/config/999-add-custom-user
>> and put useradd commands
> Thank you. Does this hook method creates new user directly in system, or just adds it every time at system start (like default live-user)?
> Normal useradd command prompts for user password etc, how does this look like with hook-script? Should informations like user password be included somehow in hook-script? Can you provide a sample of such script?
*useradd* dont prompt for password as adduser
you must use useradd
also you can use chpasswd to assign the live users password's, for example:
--- cut config/include.chroot/lib/live/config/888-add-custom-user ---
# add user and set default groups
useradd custom_user -G users,adm,sudo
echo " set default passwords "
echo "root:the_root_password" | chpasswd
echo "custom_user:the_custom_user_password" | chpasswd
--- cut ---
this custom_user is created when live boot
Dock Sud BBS