View Issue Details

IDProjectCategoryView StatusLast Update
0006633Kali LinuxGeneral Bugpublic2020-09-16 07:54
Reportervanguard Assigned Torhertzog  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0006633: Self build livesystem - User / Password kali / kali not working
Description

Dear maintainers,

sorry, tu disturb you again. From time to time I am building my own livesystem from your git. Everything is working fine,
except one thing: It is not possible to login with the user kali and the password kali.

I found in the forums, that other people also had the same problem, same as myself, to the time, when you changed the credentials from root/toor to kali/kali.

What do I do wrong?

Steps To Reproduce

I installed a fresh live-build-config from your git. Then I build the iso as usual. I am always building for amd64 and for i386.

On both livefilesystems kali/kali does not work.

is there a default password for root, too?

Additional Information

I made several builds to make sure, that it is not a problem during the build. Got always the same results. I believe, the passwords are somewhere in the configuration preinstalled, but do not know where. If so, how can I check these. Can I chech it at all?

Activities

rhertzog

rhertzog

2020-08-08 09:18

administrator   ~0013250

The password is set at run-time during boot by live-config though the script that is shipped in kali-config/common/includes.chroot/usr/lib/live/config/0031-kali-password in live-build-config (and that should be available as /lib/live/config/0031-kali-password and /usr/lib/live/config/0031-kali-password in the target chroot).

I have no idea why it's not working for you.

kali-config/common/hooks/live/kali-hacks.chroot might also be involved if /lib is not a symlink to /usr/lib because in that case files from /usr/lib/live/config/ are moved into /lib/live/config/

vanguard

vanguard

2020-08-09 14:33

reporter   ~0013257

Yes, checked on these files. However in the password file there is no user kali present. Even no other user with level 1000 (or higher is found)
For the user root I only found an encrypted password. Guess, this is preset and will be copied into the shadowfile during build. As I do not know the unencrypted password, I must always set a new one at every boot. Maybe you could check and tell me the default, you use in git. It is not toor, not kali and not admin nor root.

rhertzog

rhertzog

2020-08-09 19:21

administrator   ~0013258

the kali user is also created by live-config, a bit earlier, due to kali-config/common/includes.chroot/etc/live/config.conf.d/kali.conf

vanguard

vanguard

2020-08-16 13:43

reporter   ~0013278

Ok, checked your mentioned paths and config. They are existent, a preencrypted password exists and a command to add it to the livesystem. However, a new build showed no user kali in /e t c/p asswd in the new livefile. So it looks, it is not created somehow. Any ideas, what I could do?

Also to my other question: What is the default password for the user root? I found none in the config of the live-build.

vanguard

vanguard

2020-08-16 13:44

reporter   ~0013279

Sorry, had to write /etc / passwd in a strange way, as your sucuri firewall blocks the correct string.

vanguard

vanguard

2020-09-08 09:52

reporter   ~0013402

Today built a new one, 64-bit as well as 32-bit. Again there is no user kali existent and no predefined password for root. I checked, and I found scripts as before mentioned in the git tree/sources, which should create user and passwords for both, kali and root.
However, it looks like, these scripts are not executed somehow. I have no idea, where to look now, as I am not much experienced with the internal mechanisms of live-build and related hooks.
All I can say: It still does not work, neither on i386 nor on amd64.
I believe, an installation is working in another way as creating a livefile system, as when I install kali, then a normal user is created. IMO it is based on the installert of debian and has nothing to do with the live-build process.

vanguard

vanguard

2020-09-13 07:04

reporter   ~0013416

Rechecked and rechecked again. I foound the script, which changes the password of the user kali. But I looked everywhere, and did not find any script, which is creating the user kali itself. Can someone give me a hint, where in the git tree I should take a look?

Also I would be interested, where or in which script the default password for root is set.

Thank you very much.

rhertzog

rhertzog

2020-09-14 06:10

administrator   ~0013417

The script is part of the live-config package: /lib/live/config/0030-user-setup

And there's no script that is setting up the root password. You just can't use the root account when you configure a normal user (except through sudo).

vanguard

vanguard

2020-09-14 08:19

reporter   ~0013418

Ok, understood, no root.

I checked the script, you mentioned. I am not very experienced with sripting, and the script does obviously not vreate the user kali, but is crearing this from the grub commandline.

So, to understand this, my question:

I am building my kali versions with a script. The script is not changed since years and worked well. However, can it be, that the script has to be changed?

This is, what I am using:


#!/bin/sh

Author Hans <[email protected]>

License: GPL

Set some variables, not active yet.

architecture: i386, amd64, arm

ARCH=amd64

Distribution, you might not want to change it.

DISTRO=kali-rolling

Your preferred window-manager: lxde, kde, xfce, gnome

VARIANT=lxde

Environmet for your local proxy

PROXY=http://localhost:3142/

language, keyboard, locales everything you might not need to change

BOOTAPP="boot=live noconfig=sudo username=root hostname=kali ignore_uuid locales=de_DE.UTF-8 keyboard-layouts=de keyboard-variants=nodeadkeys"

Clean your system, not really necessarey, as the latter "./build.sh" does

this either.

lb clean

VERY IMPORTANT: Make sure, apt-cacher is started, even, if you are sure,

it is already running!

/etc/init.d/apt-cacher-ng stop && sleep 3 && /etc/init.d/apt-cacher-ng start

set your needed environment and preparations.

export http_proxy=http://localhost:3142/
lb config

This command starts the actual build. All commands are in one line.

However, this script might be improved, to use variables for better

configuration possibilities.

./build.sh --arch $ARCH --distribution $DISTRO --variant $VARIANT --verbose -- --apt-http-proxy $PROXY --bootappend-live "$BOOTAPP"

these options can be used for further commands after build

for example, if you want to burn a dvd, shutdown, whatever

Examples for my personal needs below

#/etc/init.d/apt-cacher-ng stop

Suggestions for handling the built image.

cp /home/username/live-build-config/images/*.iso /home/user/

wodim /path_to_your_live_build/live-build-config/images/your_image_name.iso

Some opportunities at unattended build run, what to do after the build succeeded.

halt -p

reboot

shutdown -h now


Can it be, that the variable "username=root" is wrong for actual kali versions? Do you see other errors?

Thanks for your help.

rhertzog

rhertzog

2020-09-14 08:42

administrator   ~0013419

Can it be, that the variable "username=root" is wrong for actual kali versions? Do you see other errors?

Yes. If you tell live-config to create a root user, it will not create a kali user... and "noconfig=sudo" is also wrong. Just drop those arguments from command line.

If you want to add extra options, start from the options that we pass in auto/config and add the ones that you need only.

vanguard

vanguard

2020-09-16 06:48

reporter   ~0013434

Well, I removed the two above extra options. Now it works, the user kali is beeing added. I also followed your advice and added my needs to auto/config.

So I think, this bugreport can safely be closed. Maybe you want to mention these things on your website, as the options I used, I got also from your site, but as things changed in kali, these are no more used. This was not well documented, so I ran into this issue.

While closing this bugreport, maybe you can take the advantage and answer me a little offtopic question: I am building with the option "--variant lxde" (hope it is lxde, not LXDE) , but when the livefile is starting, it is starting into xfce. Of course I can stop XFCE and start LXDE. Is there a way, how automatically starts LXDE? If this is not possible, no problem, this is no bugreport worth! Anyway, thanks for all the help!

Best regards and stay safe!

Hans

rhertzog

rhertzog

2020-09-16 07:54

administrator   ~0013435

Thanks, closing.

As for XFCE starting with "--variant lxde" that doesn't make a lot of sense. XFCE should not even be installed. kali-config/variant-lxde/package-lists/kali.list.chroot only list kali-desktop-lxde and the latter should not pull XFCE.

You probably have another issue somewhere else in your build infrastructure.

Issue History

Date Modified Username Field Change
2020-08-07 19:26 vanguard New Issue
2020-08-08 09:18 rhertzog Note Added: 0013250
2020-08-09 14:33 vanguard Note Added: 0013257
2020-08-09 19:21 rhertzog Note Added: 0013258
2020-08-16 13:43 vanguard Note Added: 0013278
2020-08-16 13:44 vanguard Note Added: 0013279
2020-09-08 09:52 vanguard Note Added: 0013402
2020-09-13 07:04 vanguard Note Added: 0013416
2020-09-14 06:10 rhertzog Note Added: 0013417
2020-09-14 08:19 vanguard Note Added: 0013418
2020-09-14 08:42 rhertzog Note Added: 0013419
2020-09-16 06:48 vanguard Note Added: 0013434
2020-09-16 07:54 rhertzog Assigned To => rhertzog
2020-09-16 07:54 rhertzog Status new => closed
2020-09-16 07:54 rhertzog Resolution open => fixed
2020-09-16 07:54 rhertzog Note Added: 0013435