Results 1 to 10 of 10
  1. nullr's Avatar
    Posts
    136 Posts
    Global Posts
    152 Global Posts
       #1  
    A couple of weeks ago sprint nav broke (some service failed to start). Looked here and the only listed fix was doctor still 1.4.1.1 at this point. So I did full erase from info app then doctored. Since I first got my phone I have used this page to get openssh up and running. I know theres one in preware with key and wifi only but I want the evdo and passwd option. Script runs with no errors ask user name, passwd and other options. I reboot the phone after attempt to open an ssh session it logs in after I input the password it scrolls one line and just hangs. If I do the wrong password it wont let me in. From the terminal app I made another user. This time it logs in with errors

    mkdir: cannot create directory '/var/luna/': Permission denied
    ln: /var/luna/preferences/localtime: Permission denied
    So I try to sudo -s

    >>> /opt/etc/sudoers: /etc/sudoers.d near line 88 <<<
    sudo: parse error in /opt/etc/sudoers near line 88
    sudo: no valid sudoers sources found, quitting
    Have doctored several times did OTA update when it cameout and doctored twice with 1.4.5. Sometimes I dont have to make the second account manually but other than that still having problems with sudo. After some google came up with another case of the same error here a dd-wrt forum (optware) with exact same error and similar date to when this occurred to me. Has anyone else experienced this problem or am I the only one who uses ssh? Might try the preware versions but im pretty sure the problem is with sudo (maybe a change in protocol the script does not account for?). Can post my sudoers file if it helps. I also tried installing just the bootstrap and cli installer package from preware and grabbing all the packages separately with same results. The problem started in 1.4.1.1 which was working fine before I doctored so I know its not the webos version. Help.
  2. #2  
    Install the OpenSSH package from Preware, and follow the instructions in the homepage link for that package.

    All other instructions on the internet (including the ones you reference) are wrong.

    -- Rod
    WebOS Internals and Preware Founder and Developer
    You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
    All donations go back into development.
    www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
  3. nullr's Avatar
    Posts
    136 Posts
    Global Posts
    152 Global Posts
       #3  
    Quote Originally Posted by rwhitby View Post
    Install the OpenSSH package from Preware, and follow the instructions in the homepage link for that package.

    All other instructions on the internet (including the ones you reference) are wrong.

    -- Rod
    Tried that again yesterday after making the thread. I doctored installed preware and first thing I installed was optware and all the openssh packages and dependinces. Could not find a link so I seached. The only one I found was on the webos-internals wiki site here. I generated keys and copied the public/private keys (with terminal app as instructed in wiki page). Set chmod for id_rsa on client (got permission error without it). Generated keys several times with and without pass and nothing would connect (used root as user). Ubuntu terminal and Win7 putty (converted key with puttygen) failed over wifi on port 22.

    Process I used to make and copy keys.
    mount -o remount,rw /
    cd /
    /opt/bin/ssh-keygen
    (put in pass)
    mv /home/root/.ssh/id_rsa.pub /home/root/.ssh/authorized_keys
    cp /home/root/.ssh/id_rsa /media/internal/id_rsa

    Then copied id_rsa from pre to /home/user/.ssh/id_rsa
    (rebooted Pre at this time)

    chmod 640 /home/user/.ssh/id_rsa

    ssh -i /home/user/.ssh/id_rsa root@192.168.1.108 (Pre IP)
    (put in key password)


    So I removed them all and gave the script another go.

    This time I made it work. Made an admin group then added a new user for that group. Added

    root ALL=(ALL) ALL
    %admin ALL=(ALL) ALL
    To line 88 (referenced in the error when sudo is first attempted).

    I would like to get the preware version to work as it would be faster should I need to doctor in the future. I just need to know where the guide is listed.
  4. #4  
    Quote Originally Posted by nullr View Post
    Tried that again yesterday after making the thread. I doctored installed preware and first thing I installed was optware and all the openssh packages and dependinces. Could not find a link so I searched.
    Click on the OpenSSH package in Preware. There will be a description for the package. There will also be a homepage link. Click on the homepage link.

    -- Rod
    WebOS Internals and Preware Founder and Developer
    You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
    All donations go back into development.
    www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
  5. #5  
    Rod
    if u install openssh and sftp from preware, how and where do you set the priviledged user and pwd?
    In the manual way, as described in the link above by NULLR, you are prompted for them.

    In the webos internals page there is no mention of setting up the account; is there no real need since we can use root as the username?
  6. #6  
    Quote Originally Posted by NABRIL15 View Post
    Rod
    if u install openssh and sftp from preware, how and where do you set the priviledged user and pwd?
    In the manual way, as described in the link above by NULLR, you are prompted for them.

    In the webos internals page there is no mention of setting up the account; is there no real need since we can use root as the username?
    You use root and ssh keys, which is more secure and is not overwritten each time webOS is updated.

    -- Rod
  7. nullr's Avatar
    Posts
    136 Posts
    Global Posts
    152 Global Posts
       #7  
    Quote Originally Posted by rwhitby View Post
    Click on the OpenSSH package in Preware. There will be a description for the package. There will also be a homepage link. Click on the homepage link.

    -- Rod
    Yes this does lead to the page I found unfortunately it keeps refusing my private key.

    Quote Originally Posted by NABRIL15 View Post
    Rod
    if u install openssh and sftp from preware, how and where do you set the priviledged user and pwd?
    In the manual way, as described in the link above by NULLR, you are prompted for them.

    In the webos internals page there is no mention of setting up the account; is there no real need since we can use root as the username?
    Running as root is generally frowned upon from a security standpoint and carrying keys is a pain. Sudo gives more control. That is if you configure it with user groups and such. For most Pre users the key way would probably be safer. If you can get the keys to work the preware one should do just fine the app page tells you how to add evdo so it would be pretty much the same without sudo. Checked and the problem is with the script. It adds permissions for sftp but misses gain sudo one for some reason (probably change in sudo config). After trying both methods the script is faster, easier and more convinent. Just add "username ALL=(ALL) ALL" to line 88 or add the %admin if you make an admin group . If password gets wiped just open terminal and do "passwd username" to set new password although through the first wave of updates I never had ssh stop working and I went through atleast two phones (battery/speaker problems) from 1.4.1.1 to 1.4.5 so reinstalling is something I have gotten used to.
  8. #8  
    Quote Originally Posted by nullr View Post
    Checked and the problem is with the script. It adds permissions for sftp but misses gain sudo one for some reason (probably change in sudo config). After trying both methods the script is faster, easier and more convinent. Just add "username ALL=(ALL) ALL" to line 88 or add the %admin if you make an admin group . If password gets wiped just open terminal and do "passwd username" to set new password although through the first wave of updates I never had ssh stop working and I went through atleast two phones (battery/speaker problems) from 1.4.1.1 to 1.4.5 so reinstalling is something I have gotten used to.
    The script is no longer supported by me. It causes too much of a support load every time that a webOS update overwrites the /etc/passwd file (every time so far that I've seen) and ssh suddenly stops working for people.

    I only recommend and support ssh keys and OpenSSH in Preware now.

    -- Rod
    WebOS Internals and Preware Founder and Developer
    You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
    All donations go back into development.
    www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
  9. nullr's Avatar
    Posts
    136 Posts
    Global Posts
    152 Global Posts
       #9  
    Quote Originally Posted by rwhitby View Post
    The script is no longer supported by me. It causes too much of a support load every time that a webOS update overwrites the /etc/passwd file (every time so far that I've seen) and ssh suddenly stops working for people.

    I only recommend and support ssh keys and OpenSSH in Preware now.

    -- Rod
    This explains why you said the script was wrong even though your name can be found in several places of it. Making a new user would be simple for me but the problems with sudo now just make it harder to use. If you never used linux id say its pretty impossible to fix this problem. I would also recommend stay away from the script for now. Did it again and it looks like it requires more than just editing the sudoers file. Going to install the emulator again to test how to fix this problem.
    Last edited by nullr; 08/20/2010 at 09:18 PM.
  10. #10  
    Quote Originally Posted by rwhitby View Post
    All other instructions on the internet (including the ones you reference) are wrong.
    Heh, and I believe it. When I first got my Pre I was attempting to set up FTP access into it, and had several false starts before I found the Application:OpenSSH page—and a couple more just making some dumb newbie mistakes trying to implement it.

    I wrote up what I learned for others like me who were just interested in getting SFTP working quickly, but it works great for Putty and other OpenSSH applications as well. Big thanks to the webOS Internals crew for these great tools!

Posting Permissions