Welcome
Welcome to refracta

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

Refracta Installer not changing passwords

Stuff that has not yet gone into the official build.

Refracta Installer not changing passwords

Postby RichJack » Fri Jun 20, 2014 10:28 pm

Hi there

I have been building a respin of Debian Jessie and using your tools. Snapshot works great by the way!

The problem appears with the GUI installer - I am using the one from testing 9.1.0.

1. It reports a potential error when you exit gparted after partitioning. It's not an error. It appears to be capturing the exit code 0 and reporting it as a potential error. This can be ignored though.

2. It doesn't reset the live user or root password even when you select under expert install to do just that. Once the system is installed and booted into, the username is correctly changed, but the password is whatever was on the live ISO. This is the same for the root account.

I had a look at the code and it appears that you are actually renaming the live user account rather than creating a new account. I can see the reasons for this as it will keep any cosmetic changes that may have been made whilst in live mode but just wondered if this was causing the problem?

I am quite happy to do any further testing as required as I do think these are great tools.

Kind regards
Richjack
RichJack
 
Posts: 6
Joined: Wed Jun 18, 2014 9:14 pm

Re: Refracta Installer not changing passwords

Postby dzz » Sat Jun 21, 2014 1:54 am

Thanks RichJack for testing Refracta tools. Please note also this is the "testing" installer version!

I write from a new sid installed with 9.1.0 .. confirmed here, password change fails and warning on gparted exit.

More later.. I know why the password reset fails but not yet why the warning on gparted exit.
dzz
 
Posts: 629
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England

Re: Refracta Installer not changing passwords

Postby fsmithred » Sat Jun 21, 2014 2:02 am

There's something weird with the password change. It works fine for me, but it didn't work for dzz. He offered alternate code in this thread - new-versions-of-installer-and-snapshot-9-1-x-for-sid-t383.html

You already noticed that it doesn't change the password or user name in the running system. That's the way it's supposed to be. The changes only get made in the installed system. (Well, the changes are supposed to happen in the installed system.)

You may get some hints about what's going on if you run in debug mode. Start it from a terminal with the command, 'refractainstaller-yad -d' and then check /var/log/refractainstaller_error.log.

There are a bunch of changes mentioned in that thread, but I haven't incorporated them into a new package yet. I haven't had time to do anything with it lately, and hard drive space has been a problem for awhile. I'm planning to fix the latter soon, and I'll need to set aside some time to work on the installer. Thanks for reporting. Help is appreciated.

OK, dzz posted while I was still composing. @dzz - do you know why the password change did not fail for me?
And while I've got your attention, did you fix the uuid and debug mode problems in your rewrite? If so, is a deb available for people to use? I just looked at the dates on the posts where we discussed this, and I'm a little shocked and embarrassed that I haven't done anything in so long. I may have to buy myself a few free days with no distractions and get to work on this.
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Re: Refracta Installer not changing passwords

Postby fsmithred » Sat Jun 21, 2014 2:29 am

There's a check_exit called after gparted. I changed the check_exit function in refracta2usb because it was reporting the exit code for the yad window instead of the last command that caused the error. The function starts on line 187 of refractainstaller-yad 9.1.0, and the fixed version (copied directly from refracta2usb) looks like this -
Code: Select all
check_exit () {
exit_code="$?"
if [[ $exit_code -ne 0 ]] ; then
   $DIALOG --question --title="$TITLE error" --window-icon=error  \
   --${BUTTON0}="Continue"${BUTTON0NUM} --${BUTTON1}="Exit"${BUTTON1NUM} \
   --text="Error detected: $exit_code  $error_message
\nSee $error_log for details. Press \"Continue\" to proceed anyway"

   if [[ $? -ne 0 ]] ; then
   cleanup
   exit 1
   fi
fi
}


Another option would be to remove the check_exit after gparted on line 417.
Code: Select all
   case $ans in
      0)    gparted ; check_exit ;;
      1)  xterm  -fa monaco -fs 12 -geometry 90x20+0+0 -hold -e cfdisk ;;
      2)  ;;
      3) exit 0 ;;
   esac


like this:
Code: Select all
   case $ans in
      0)    gparted ;;
      1)  xterm  -fa monaco -fs 12 -geometry 90x20+0+0 -hold -e cfdisk ;;
      2)  ;;
      3) exit 0 ;;
   esac


I don't know if this fixes the problem. I don't even recall if I encountered the problem.
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Re: Refracta Installer not changing passwords

Postby dzz » Sat Jun 21, 2014 2:46 am

My current experimental installer debs (tested and working here only): http://exegnulinux.net/refracta/experimental/installer/ .. Don't remember uuid and debug mode problems, it all seems to work. It defaults to full debug log (set in conf file) and has clearer GUI dialogs for user, root, hostname and sudo configs

For 9.1.0 this edit in /usr/bin/refractainstaller-yad might work:

Line 1545 :
Code: Select all
echo $newpass | chroot /target passwd
# change to:
chroot /target /bin/bash -c "echo -e \"$newpass\n$newpass\n\" | passwd root"

Line 1567:
Code: Select all
echo $newpass | chroot /target passwd "$newname"
# change to:
chroot /target /bin/bash -c "echo -e \"$newpass\n$newpass\n\" | passwd $newname"


I never noticed the gparted exit error before today, maybe because I normally sort partitions before installer.
dzz
 
Posts: 629
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England

Re: Refracta Installer not changing passwords

Postby RichJack » Sat Jun 21, 2014 7:39 am

Hello both.

Wow, thanks for the quick replies. I realised it was only a testing version, so to say everything else works flawlessly it is amazing, and I know how hard it is to keep code up to date especially when you are trying to introduce enhancements.

A few years ago I worked on a liveUSB script for PCLinuxOS and then Unity Linux and I was tearing my hair out - I couldn't reproduce people's bugs, but yet there they were! And I was trying to find time to fix them whilst improving the script and GUI element which meant I took my eye off my main goal. So I completely understand!

I'll try the suggestions posted and reply with my results, but it might be until after the weekend as I am on Daddy duty all weekend :)
RichJack
 
Posts: 6
Joined: Wed Jun 18, 2014 9:14 pm

Re: Refracta Installer not changing passwords

Postby dzz » Sat Jun 21, 2014 12:05 pm

Ok.. reinstalled the same sid image using 9.1.0 with edits for both issues as described above. Forgot to use debug but here's a snip from terminal:

Code: Select all
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully

Passwords are reset.. no gparted exit warning.. writing from that install now.

My experimental debs still give the gparted warning, will fix that and post new ones to the same url later. Please note those debs (and anything else posted there) are temporary "development" versions only and might have other bugs.. but it does help if someone else can test them also.

Thanks again RichJack.. if someone actually says what is wrong, we're in with a chance of sorting it!

EDIT Updated experimental GUI deb now posted http://exegnulinux.net/refracta/experim ... z3_all.deb (best to use the associated base deb posted with it)

@fsr:
did you fix the uuid and debug mode problems in your rewrite

just remembered.. both are marked "fixed" in the previous changelog (and work here)

No idea why password reset works only for you!
dzz
 
Posts: 629
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England

Re: Refracta Installer not changing passwords

Postby RichJack » Sun Jun 22, 2014 8:02 pm

Hi dzz

Many thanks, I can confirm that your 'experimental' debs have fixed both the gparted and passwords issue. Brilliantly quick work! I have tested both the simple and expert installers with and without sudo and both work. I should point out that at this stage I have only tested in VirtualBox and not on real hardware but I intend to try it out on real hardware this week.

Many thanks
RichJack
RichJack
 
Posts: 6
Joined: Wed Jun 18, 2014 9:14 pm

Re: Refracta Installer not changing passwords

Postby RichJack » Mon Jun 23, 2014 1:14 pm

I can confirm that dzz's installer works on real hardware too - no reason why it shouldn't but always best to check. Thanks :)
Tested on HP Elitebook 8440
160GB SATA HDD
Intel Core i5
Intel onboard HD i915 graphics
RichJack
 
Posts: 6
Joined: Wed Jun 18, 2014 9:14 pm


Return to Experimental

Who is online

Users browsing this forum: No registered users and 0 guests

suspicion-preferred