Results 1 to 9 of 9

Thread: Enable the bt login prompt in persistent LiveUSB mode and allow password changing

  1. #1
    Senior Member orange's Avatar
    Join Date
    Jan 2010
    Posts
    134

    Default Enable the bt login prompt in persistent LiveUSB mode and allow password changing

    Community,

    in persistent LiveUSB mode, autologin for root is enabled (with a blank password) by default AND it's not possible to change the user passwords (i.e. they won't survive a reboot). From my perspective this is not feasible for daily operation. Thus, let's change this (special credit goes to loop4me for contributing):

    1st Step: Create an init-script /etc/rcS.d/S99whatever.sh with the following content
    Code:
    #!/bin/sh
    # enable bt login
    cp /etc/event.d/tty* /tmp/
    for i in /tmp/tty*; do
    sed -i -e 's/\/bin\/login -f root <\/dev\//\/sbin\/getty 38400 /' -e 's/ > \/dev\/tty.*//' "$i"
    done
    mv /tmp/tty* /etc/event.d/
    # restore /etc/shadow
    mv /etc/shadow.new /etc/shadow
    2nd Step: Create two init-scripts /etc/rc0.d/S00whatever.sh and /etc/rc6.d/S00whatever.sh with the following content
    Code:
    #!/bin/sh
    # save /etc/shadow
    cp /etc/shadow /etc/shadow.new
    3rd Step: Make all three init-scripts executable
    Code:
    # chmod 755 /etc/rcS.d/S99whatever.sh
    # chmod 755 /etc/rc0.d/S00whatever.sh
    # chmod 755 /etc/rc6.d/S00whatever.sh
    4th Step: Set a new password for root (or any other current user)
    Code:
    root@bt:~# passwd
    Enter new UNIX password:
    Retype new UNIX password:
    passwd: password updated successfully
    Now, just reboot and see what happens. Have fun!

  2. #2
    Junior Member loop4me's Avatar
    Join Date
    Mar 2008
    Posts
    54

    Default

    or4n9e,

    can i call them a shadowplay scripts?

    It's working!

  3. #3
    Senior Member orange's Avatar
    Join Date
    Jan 2010
    Posts
    134

    Default

    can i call them a shadowplay scripts?
    lol, that sounds pretty accurate to me, yes!

  4. #4
    Just burned his ISO
    Join Date
    Jan 2010
    Posts
    16

    Default

    With your tagline of "see what happens," I was a little hesitant since I didn't see any comments verifying that it works.

    For anyone else reading this:

    It worked 100% flawlessly.

    ymmv

    THANK YOU!

  5. #5
    Just burned his ISO
    Join Date
    Jan 2010
    Posts
    16

    Exclamation Woops - Improper shutdown = locked out

    My laptop has a crappy connection in the cord. And since BT4 doesn't warn you a gazillion times and then finally force you into hibernation when your battery is about to die, like windows does....

    Well, there I am going on my merry way, when POOF... it is all gone.

    No problem. I reattach the cord and boot up. But now...

    Username: root
    Password: (password)

    nope. BT4 doesn't want to be my friend.

    I see in your scripts that things happen during rc0 and rc6. I am pretty green, but from what little knowledge i have, I am guessing that the improper shutdown totally skipped the rc0 script?


    I will be able to boot into a bt4 beta copy using another usb drive. Can i mount my bt4 pf usb drive and perform a relatively simple fix to this?

    Of course, if I could just log in, I could run the script, to enable myself to login..... round and round we go.

    Thanks in advance.

    UPDATE: I hacked around and tried various logins. Seems that failing to run that script reverts back to the old (e.g. NO) root password. So if this happens to you, try logging as root with no password. Worked for me.

  6. #6
    Junior Member loop4me's Avatar
    Join Date
    Mar 2008
    Posts
    54

    Default

    I think i understand what are u tallking about valterra,
    the scripts works with no problem. But they are a little tricky, i mean they actualy tricks the persistent install.

    If i understood u right, your's laptop end up in hibernation mode and the user you added was lost.

    I think ,because the unusual shutdown never succeeded to trigger the scripts wright. The shadow.new file did not mv to shadow file.

    Also i never use hibernation mode. So try to setup kde to shutdown bt when battery is low or something. Don't know how hibernation mode act with persistent.

  7. #7
    Just burned his ISO
    Join Date
    Jan 2010
    Posts
    16

    Default Not hibernation

    This wasn't a hibernation issue. I haven't played around enough to see if sleep and hibernation are even possible on BT4 / KDE.

    This was a case where the battery went dead - POOF - computer turned off. Just like a desktop computer that gets unplugged from the wall!

    I did get the issue resolved. Thanks!

  8. #8
    Just burned his ISO
    Join Date
    Aug 2009
    Posts
    4

    Default

    Thank you or4n9e! Nice ^^

  9. #9
    Junior Member IAMZOMBIE's Avatar
    Join Date
    Jan 2010
    Posts
    81

    Default

    Thanks. I'm going to try this. I'm not a fan of not having a password on my good install.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •