VI text editor

Posted by bobisdaman 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
VI text editor
June 12, 2014 02:40AM
I am having trouble setting up my new piratebox. Call me a noob, but I got it all set up and I do the "ssh root@192.168.1.1" command and after that it says "Activate the Kareha Image and Discussion Board by using the vi text editor (vi cheat sheet) to change the admin username and password "

Wut? So I activate it, and get completely lost from there. help pleas.
Re: VI text editor
June 14, 2014 02:38AM
I Had a lot of trouble figuring this out myself but heres what got it working for me

Once in the SSH Session go ahead and run the following command:
vi /opt/piratebox/www/board/config.pl

This opens the config.pl using the vi text editor. From here you navigate around using the following keys:

h Move left
j Move down
k Move up
l Move right

You want to move the cursor over to where it says ADMIN_PASS and delete the word ADMIN_PASS by typing in dw then hitting enter (d = activates the delete function, w="Word" so basically you are activating, delete + word)

Once thats done, you are now in input mode, so go ahead and type whatever you want the admin password to be within the ' ' brackets that should be left over.

Once you have completed typing in the password, hit escape twice on the keyboard, this should put you back into "View" mode.

now go down to any other changes you want to make (you also want to modify the SECRET string)

once all changes have been made, again hit escape twice to get you into "View" mode and then type :x
which will save all changes and exit out of the vi editor.

to make sure you have done all of this correctly and saved properly exit out and get back into the SSH Session and once again type in:

vi /opt/piratebox/www/board/config.pl

if you see that your changes are in place you should be good to go to the next step!

Hope this helps, took me a while before i could figure all of this out...
Re: VI text editor
June 14, 2014 03:17AM
I must have done something wrong. This is all that shows up. Do you know why? Thanks for that though, once I fix this that will be very helpful. Terminal view (using OsX) after command
Re: VI text editor
June 14, 2014 05:33AM
Well that definately looks like the vi editor...

sorry, i didnt realize you had a mac. I have been running this via Putty on Windows. I dont know how much further i can help...

Maybe try via a windows box?
Re: VI text editor
June 14, 2014 10:47PM
that looks more like the file is not available!!

can you check it via

ls -l /opt/piratebox/share
ls -l /opt/piratebox/share/board

Matthias
Re: VI text editor
June 15, 2014 04:07AM
All it says it "no such file or directory"

Did I mess up during the initial installation?
Re: VI text editor
June 15, 2014 09:13PM
It seems you installation did not work, yes.

can you please post the output of

ls -l /mnt 
ls -l /mnt/usb
ls -l /mnt/usb/install
dmesg | grep sda

Thanks
Re: VI text editor
June 15, 2014 10:58PM
I'm not sure if I'm putting it in correctly, but all that I am getting is still "No such file or directory"
Re: VI text editor
June 16, 2014 06:55PM
you won't get this message on dmesg| tail ...
Please post the output as you get it winking smiley
Re: VI text editor
June 20, 2014 07:44PM
Sorry I'm really bad at this. Do I just start up the piratebox and copy and paste that into the terminal?
Re: VI text editor
June 21, 2014 06:03AM
Yes, simply copy e.g.
dmesg | tail
and other codes to the terminal and post us the output.
Re: VI text editor
June 26, 2014 06:43PM
Sorry I'm probably doing this wrong. All I get it this



Edited 1 time(s). Last edit at 06/26/2014 06:44PM by bobisdaman.
Re: VI text editor
June 26, 2014 06:47PM
ok,
please post the output of
cat /etc/pbx_custom_image
cat /etc/openwrt_release


This is only my signature.
Re: VI text editor
June 26, 2014 06:56PM
I got this

root@OpenWrt:~# cat /etc/pbx_custom_image
cat: can't open '/etc/pbx_custom_image': No such file or directory
root@OpenWrt:~# cat /etc/openwrt_release
DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="Bleeding Edge"
DISTRIB_REVISION="r41147"
DISTRIB_CODENAME="barrier_breaker"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker r41147"
DISTRIB_TAINTS=""
root@OpenWrt:~#
Re: VI text editor
June 26, 2014 07:49PM
Hi,
you are using an unsupported trunk image and not one of our auto-install images.
At least our custom images has the USB driver installed.

That explains everything.

Which device do you have?

Matthias


This is only my signature.
Re: VI text editor
June 26, 2014 07:53PM
Device as in router? Im using the TP-Link WR703N with a Kingston 16gb flashdrive
Re: VI text editor
June 28, 2014 08:43AM
Hi,
then I recommend you to reflash the device with our auto install image. Follow the upgrade instruction from this page [www.piratebox.cc]

Matthias


This is only my signature.
Re: VI text editor
June 30, 2014 01:52AM
I've been following those instructions but when I try to go to the URL of my router it can't connect. Any ideas?

Edit: I tried the ssh root thing because I can't connect to it on the internet and got this... I went to the folder and only saw a ton of random numbers. What do I do now?
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
91:57:e6:f4:4a:0d:0f:ae:f9:90:27gb:7g:8g:g7:cg. [Changed a little for security purposes]
Please contact your system administrator.
Add correct host key in /Users/[myname]/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/[myname]/.ssh/known_hosts:1
RSA host key for 192.168.1.1 has changed and you have requested strict checking.
Host key verification failed.
[myname]-MacBook:~ [myname]$



Edited 1 time(s). Last edit at 06/30/2014 02:09AM by bobisdaman.
Re: VI text editor
July 01, 2014 07:30PM
Hi,
the issue you posted is because the Box creates a new SSH key evertime you flash the box. This is expected, yes.

To fix that: [askubuntu.com]
or simply remove ~/.ssh/know_hosts on your computer (if you use ssh more frequently, edit the file and remove the particular line).

Matthias


This is only my signature.
Re: VI text editor
July 25, 2014 02:02AM
It's funny, vi kinda of grown on me, I actually like it nowsmiling smiley weird right? Hated it at first!