stevenshiau / clonezilla

Clonezilla is a partition or disk clone tool similar to Norton Ghost®. It saves and restores only used blocks in hard drive. Two types of Clonezilla are available, Clonezilla live and Clonezilla SE (Server Edition).
GNU General Public License v2.0
594 stars 93 forks source link

pxe boot, ssh login, unable to set "user" password #88

Open nerozero opened 1 year ago

nerozero commented 1 year ago

Hi

I'm unable to login using ssh to clonezilla host. Here is my pxe boot config:

echo 1234 | mkpasswd -s
7I9XZ9FO0Gd2g
- - - - 8< - - - -
 APPEND initrd=/clonezilla/live/initrd.img boot=live union=overlay username=user config components quiet edd=on nomodeset enforcing=0 noswap noprompt vga=788 fetch=http://10.71.12.1/clonezilla/live/filesystem-nz.squashfs keyboard-layouts=NONE ocs_live_batch="no" locales=en_US.UTF-8 vga=788 nosplash net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 ocs_numlk="on" ocs_daemonon="ssh" usercrypted=7I9XZ9FO0Gd2g
- - - - 8< - - - -

Here is the result appears in kernel messages:

- - - - 8< - - - -
Feb 06 17:02:10 localhost.localdomain kernel: Run /init as init process
Feb 06 17:02:10 localhost.localdomain kernel:   with arguments:
Feb 06 17:02:10 localhost.localdomain kernel:     /init
Feb 06 17:02:10 localhost.localdomain kernel:     config
Feb 06 17:02:10 localhost.localdomain kernel:     components
Feb 06 17:02:10 localhost.localdomain kernel:     noswap
Feb 06 17:02:10 localhost.localdomain kernel:     noprompt
Feb 06 17:02:10 localhost.localdomain kernel:     nosplash
Feb 06 17:02:10 localhost.localdomain kernel:     splash
Feb 06 17:02:10 localhost.localdomain kernel:   with environment:
Feb 06 17:02:10 localhost.localdomain kernel:     HOME=/
Feb 06 17:02:10 localhost.localdomain kernel:     TERM=linux
Feb 06 17:02:10 localhost.localdomain kernel:     BOOT_IMAGE=/clonezilla/live/vmlinuz
Feb 06 17:02:10 localhost.localdomain kernel:     boot=live
Feb 06 17:02:10 localhost.localdomain kernel:     union=overlay
Feb 06 17:02:10 localhost.localdomain kernel:     username=user
Feb 06 17:02:10 localhost.localdomain kernel:     edd=on
Feb 06 17:02:10 localhost.localdomain kernel:     vga=788
Feb 06 17:02:10 localhost.localdomain kernel:     fetch=http://10.71.12.1/clonezilla/live/filesystem-nz.squashfs
Feb 06 17:02:10 localhost.localdomain kernel:     keyboard-layouts=NONE
Feb 06 17:02:10 localhost.localdomain kernel:     ocs_live_batch=no
Feb 06 17:02:10 localhost.localdomain kernel:     locales=en_US.UTF-8
Feb 06 17:02:10 localhost.localdomain kernel:     ocs_numlk=on
Feb 06 17:02:10 localhost.localdomain kernel:     ocs_daemonon=ssh
Feb 06 17:02:10 localhost.localdomain kernel:     usercrypted=7I9XZ9FO0Gd2g
- - - - 8< - - - -

however the shadow file user password field never changes. changed manually - clonezilla excepts logins.

# grep -ie "user" /etc/shadow
user:8Ab05sVQ4LLps:19394:0:99999:7:::

Also I had issues with tftp image downlad, my tftp server throws an error: DATA block 1, attempt 0 failed (Error 40: Message too long), so I moved to http transfer. Hope that couldn't be the reason.

PS. This is a first time to me doing clonezilla via pxeboot. It is highly possible that I'm doing something wrong

Thanks

stevenshiau commented 1 year ago

Thanks for your feedback. I confirmed this issue. This is due to the package live-config used in Clonezilla live is not patched to support the parameter "usercrypted". We will fix it in the next release.

Steven

stevenshiau commented 1 year ago

BTW, Clonezilla live 20221103-kinetic and 20230127-kinetic are not affected by this bug, so you can try to use it: https://clonezilla.org/downloads.php

Steven

nerozero commented 1 year ago

Steven, Thank you so much! Will try !

stevenshiau commented 1 year ago

Please give testing Clonezilla live >= 3.0.3-22 or 20230212-* a try: https://clonezilla.org/downloads.php This issue should have been fixed. Please let us know the results. Thanks.

Steven

fjk8 commented 1 month ago

I have same problem, latest version of clonezilla 3.1.3-16 and same result of grep -ie "user" /etc/shadow:

user:8Ab05sVQ4LLps:19394:0:99999:7:::

I'm also try to use plaintext passwords, but nothing changed

stevenshiau commented 1 month ago

If you do not encounter any issue to boot Clonezilla live iso/zip from CD ROM or USB flash drive, then the issue you have is actually from the boot parameters. Please post your PXE configuration file on the server so that we can help you.

Steven

fjk8 commented 1 month ago

Yes, it is issue with boot parameters. I'm able to boot Clonezilla USB live, connect to ssh, but unable to login, it doesn't matter what password I set, I'm always have user:8Ab05sVQ4LLps:19394:0:99999:7::: at shadow

stevenshiau commented 2 weeks ago

Please give testing Clonezilla live >= 3.1.3-21 or 20240823-* a try. This issue should have been fixed. If you use grub, please check the description here: https://clonezilla.org//fine-print-live-doc.php?path=clonezilla-live/doc/05_Started_with_sshd_on_and_passwd_assigned

Steven