Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: [Solved] persistent liveusb - root passwd change

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

    Default [Solved] persistent liveusb - root passwd change

    UPDATE: This issue is finally fixed and the solution is documented here - special credit goes to loop4me for contributing.

    For some reason, changing the root passwd in persistent liveusb mode (BT4PF) does not work at all. Not sure if it's me, but I'd herewith like to file a bug report. To reproduce it:
    Code:
    root@bt:~# passwd
    Enter new UNIX password:
    Retype new UNIX password:
    passwd: password updated successfully
    This seems to work perfect but neither "exit" gives a login prompt in console mode nor does a reboot ends up at a login prompt but a root prompt - no passwd asking at all. This does not apply to HDD installations of BT4PF (verified by KMDave) but persistent liveusb mode.

    Strange thing is that /etc/shadow gets updated accordingly. Here's the line of interest but the OS ignores it obviously
    Code:
    root:$6$iG2Z00sn$QCaHw207F40eoAbDwYX01mthte8sM1BamfVnf2ebWP6aqsiXaGxfHJiolEKUGVDNNuZbC9iK6a/4ZbJNz8rDP1:14448:0:99999:7:::
    From my perspective this is an URGENT thing to fix. I already did some investigation on this and found some (german) reports from standard ubuntu users encountering the very same issue. I'll keep you updated if I'll find out something else. A confirmation from someone else with a persistent liveusb install would be great.

    Thanks,
    orange

  2. #2
    Member
    Join Date
    Jun 2008
    Posts
    129

    Default

    Works for me.

    Installed using the noob-proof GUI because i'm lazy. Didn't select login in automatically.

    Boot up
    Login as User
    Sudo -i and run passwd
    exit
    logout

    and then login as root

  3. #3
    Member
    Join Date
    Jan 2010
    Posts
    332

    Default

    Works for me.

    Installed using the noob-proof GUI because i'm lazy. Didn't select login in automatically.
    It's not the same. During the ubquity installation you are asked to set up a username and a password. Using unetbootin or creating the usb by manually copying logs you in automatically as root. And that's what or4n9e is talking about.

    Have you checked system>settings>system administration>login manager >>> convenience tab
    SecurityTube has two new sections. Questions & News

  4. #4
    Member
    Join Date
    Jun 2008
    Posts
    129

    Default

    Quote Originally Posted by #mfBaranian# View Post
    It's not the same. During the ubquity installation you are asked to set up a username and a password. Using unetbootin or creating the usb by manually copying logs you in automatically as root. And that's what or4n9e is talking about.
    I know, I was just clearing up that it works with the GUI installer.

  5. #5
    Just burned his ISO imported_h4x0r's Avatar
    Join Date
    Mar 2006
    Posts
    18

    Default

    on my laptop i have a usb-persistent install too. cuz the installation dont works correctly (see my post: /forums.remote-exploit.org/backtrack-4-bugs-fixes/24532-bt4pf-hangs-boot-after-installation.html). i dont get a login prompt. it starts as root. i made bt4pf installs on diffrent systems without any problems. but i'm to lazy at the moment to configure the loginprompt.

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

    Default

    I know, I was just clearing up that it works with the GUI installer.
    As #mfBaranian# already pointed out, the information you provided is unfortunately useless as you did a real install to usb, i.e. a hdd installation to an usb flash media. The problem I describe applies to PERSISTENT LIVEUSB mode. The fact that it works with a real install is already verified. Thanks for your engagement though.
    i dont get a login prompt. it starts as root.
    This is intended behavior in persistent liveusb mode. Question is: are you able to set a root passwd that actually works? Please do the steps I described initially, reboot and tell us if you get a loginprompt afterwards or not - that's the actual question. Thanks!

  7. #7
    Just burned his ISO imported_h4x0r's Avatar
    Join Date
    Mar 2006
    Posts
    18

    Default

    Quote Originally Posted by or4n9e View Post
    This is intended behavior in persistent liveusb mode. Question is: are you able to set a root passwd that actually works? Please do the steps I described initially, reboot and tell us if you get a loginprompt afterwards or not - that's the actual question. Thanks!
    i can confirm ur issue. i did all ur steps described but dont got a loginprompt.

    this i checked too. there r no autologin or passwortless loginaccounts.
    Have you checked system>settings>system administration>login manager >>> convenience tab
    [Update]
    i have now installed kdm via synaptic. i added a new user via Settings->System Administration->User Management
    it's important to add the new user to the admin group for sudo.
    in Settings->System Administration->LoginManager i configured it to be possible only to login with the new user.
    then i rebooted.
    a x-loginprompt cames up where i can login with the user. but there is an option at the loginprompt "switch user". there r the root tty's 1-6 available.....
    without any loginprompt....alternativly u can switch between the shells and X11 with ctrl+alt+f1-6 and for the kdm ctrl+alt+f7. my unixknowledge goes not so depth that i know where to configure this issue
    nur weil du paranoid bist, heisst das nicht, dass du nicht verfolgt wirst ;!)
    ---------------------------------------------------------------------------------------------------
    if u r paranoid, it's not a indicate, that u will not be traced ;!)

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

    Default

    This is what i come up with.
    It's a persistant live/cd and we all made the persistant/usb from it.
    Booting ubuntu/bt4 in persistent mode is different from running it form standard installed version. It will boot directly with root privileges.
    U will be in able to add a user and change the root password.
    If u adduser or passwd, type login and the bt login: will show up.

    Same thing with the configure files, but the changes remains only until you reboot. It is common thing when working with persistant mode.
    The good thing is that any programs you install will persist, but some might behave strangely.

    If u look in /etc/event.d/tty1 of persistant/cd/usb
    the last line...
    exec /bin/login -f root </dev/tty1 > /dev/tty1 2>&1
    The -f root swich means that the login will not perform authentication, so it will login directly as root.

    On the installed version the same script is different and the last line is
    exec /sbin/getty 38400 tty1
    It's executing getty process ,and then getty is invokes /bin/login command.

    U can stop tty1

    initctl tty1 stop #from the tty2 or tty1 then alt+F2

    Delete -f root switch in /etc/event.d/tty1 ...it should look like this now

    exec /bin/login </dev/tty1 > /dev/tty1 2>&1

    and then start it again
    initctl tty1 start
    the bt login will show up on tty1
    bt login:

    Problem is that u can't change files in /etc/event.d/ in persistant mode. They will return as they were when u reboot.
    I'm not sure that i got all this right but maybe before the persistant live was made some changes could me made to invoke login without -f root.
    The persistan mode have problems, and the dev. team has some reason for configuring it to boot straight to root user mode. It should be live/cd so no need for adding new user for pen purposes and how this changes gona be burn on to dvd? but when the live/cd migrate to live/usb it could be a good thing.

    I got bt4pre persistant on the 701 on eee's 4GB ssd. I made ssd persistant form usb persistant, and usb was made from persistant live cd

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

    Default

    If u look in /etc/event.d/tty1 of persistant/cd/usb
    the last line...
    exec /bin/login -f root </dev/tty1 > /dev/tty1 2>&1
    The -f root swich means that the login will not perform authentication, so it will login directly as root.

    On the installed version the same script is different and the last line is
    exec /sbin/getty 38400 tty1
    It's executing getty process ,and then getty is invokes /bin/login command.

    U can stop tty1

    initctl tty1 stop #from the tty2 or tty1 then alt+F2

    Delete -f root switch in /etc/event.d/tty1 ...it should look like this now

    exec /bin/login </dev/tty1 > /dev/tty1 2>&1

    and then start it again
    initctl tty1 start
    the bt login will show up on tty1
    bt login:
    This is a VERY interesting finding. Thanks a lot for your efforts to find this out. Would you be that kind to provide the complete /etc/event.d/tty1 from an installed system please?
    Problem is that u can't change files in /etc/event.d/ in persistant mode. They will return as they were when u reboot.
    I'm not sure that i got all this right but maybe before the persistant live was made some changes could me made to invoke login without -f root.
    The persistan mode have problems, and the dev. team has some reason for configuring it to boot straight to root user mode. It should be live/cd so no need for adding new user for pen purposes and how this changes gona be burn on to dvd? but when the live/cd migrate to live/usb it could be a good thing.
    I already have a pretty good idea on how to solve this! Thus the request to post the complete /etc/event.d/tty1 from an installed system. Some time ago, I shared a solution on how to fix update-notifier (see especially the init-script /etc/rcS.d/S99update-notifier.sh I introduced there) where I had to deal with a very similar issue regarding a script in /usr/share/initramfs-tools/scripts/casper-bottom - as it seems /etc/event.d is another example for the same problem. Will post updates as available.

    Great contribution, thanks!

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

    Default

    or4n9e,
    i'm really pleased to be helpfull on this one. I saw your post "Fix update-notifier" ,and complitly understood the way the script "init-script /etc/rcS.d/S99update-notifier.sh" solve the problem.
    U realy show some effort to make it work. Big respect.

    the /etc/event.d/tty1 on installed system is:

    # tty1 - getty
    #
    # This service maintains a getty on tty1 from the point the system is
    # started until it is shut down again.

    start on stopped rc2
    start on stopped rc3
    start on stopped rc4
    start on stopped rc5

    stop on runlevel 0
    stop on runlevel 1
    stop on runlevel 6

    respawn
    exec /sbin/getty 38400 tty1

    There is some other thing that i wanted to chage in persistant, and i realy didn't have time for this.
    But after what happend tonight, i got to. U know the "Please remove disk and close the tray (if any) then press ENTER: " line, it shows up every time you poweroff. Well i was in a hurry and like 100 times before i forgot to hit the enter, and just put my laptop in a bag.
    And outside was like 40C, so hot. And when i finaly came home, the bag that was on the back seat of the car was "melting". 'cause laptop was in the bag with some other stuff ,no air . The eee was so hot i thought i could make a some fine dinner on my 701.
    Seriously it wasn't funny at all.

    If u need something else...

Page 1 of 2 12 LastLast

Posting Permissions

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