×

INDI Library v1.7.8 Released (11 May 2019)

Mid year release of INDI Library v1.7.8 comes with a few drivers and improvements to to existing drivers.

vappasswd

  • Posts: 85
  • Thank you received: 5

vappasswd was created by kamisan

I am trying to thwart my nosy neightbors from gaining access to my Astoberry and wreaking havoc.

I searched the forum for discussions related to changing the password of the VAP. Nothing tangible but I did find a section of the README file at Astroberry's Github repo that looked promising: vappasswd. Here is how I proceeded:

>sudo vappasswd
>Enter user password: astroberry
>Enter new VAP password: nonosyneighbors
>Confirm password: nonosyneighbors
>Password changed!
>You must reboot

After rebooting, when I go to connect to VAP it rejects 'nonosyneighbors' but still accepts 'astroberry'. It's as if my effort was wasted.

I am sure I am doing something stupid.

Thanks.
2 months 2 days ago #37707

Please Log in or Create an account to join the conversation.

  • Posts: 1578
  • Karma: 5
  • Thank you received: 134

Replied by Gonzothegreat on topic vappasswd

I can't help you as to why it's not working, but having just looked at the code for vappasswd I must say that any modifications of a config files should have a proper change control.
This is to allow reverting back quickly to the last good known version.

so something like as an example:
if [ -f /etc/hostapd/hostapd.conf ]; then
    OLDPSK=$(grep wpa_passphrase /etc/hostapd/hostapd.conf|awk -F= '{print $2}')
    if [ -z "$OLDPSK" ]; then
       echo "Error changing Virtual Access Point password!"
       exit 1
    else
       cp  /etc/hostapd/hostapd.conf{,"_$(date +"%d-%m-%y_%H-%M-%S")"}
       sed -i -e "s/wpa_passphrase=$OLDPSK/wpa_passphrase=$NEWPSK/g" /etc/hostapd/hostapd.conf
       echo "Virtual Access Point password changed successfully. You need to reboot to activate changes."
       exit 0
    fi
Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / QHY5 / Atik 314L+
2 months 2 days ago #37710

Please Log in or Create an account to join the conversation.

  • Posts: 85
  • Thank you received: 5

Replied by kamisan on topic vappasswd

That is the message I got:

echo "Virtual Access Point password changed successfully. You need to reboot to activate changes."

I will take a look to see what changes, if any, were made to:

/etc/hostapd/hostapd.conf

Thanks!
2 months 2 days ago #37713

Please Log in or Create an account to join the conversation.

  • Posts: 1578
  • Karma: 5
  • Thank you received: 134

Replied by Gonzothegreat on topic vappasswd

you can run :
stat /etc/hostapd/hostapd.conf
it will show you if the file has been modified really.
Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / QHY5 / Atik 314L+
2 months 2 days ago #37714

Please Log in or Create an account to join the conversation.

  • Posts: 1578
  • Karma: 5
  • Thank you received: 134

Replied by Gonzothegreat on topic vappasswd

Kstars Mac osx
Odroid C1 running indiserver (kept up-to-date with apt-get update/upgrade)
HEQ5 pro / QHY5 / Atik 314L+
2 months 2 days ago #37716

Please Log in or Create an account to join the conversation.

  • Posts: 1
  • Thank you received: 1

Replied by geordan on topic vappasswd

Do you have a 3B or 3B+? There are different hostapd.conf files for different RPi revisions, and vappasswd currently doesn't update them all correctly. I've submitted a pull request to address this issue; you can take those files and drop them into /usr/local/bin, and then vappasswd should work.
The following user(s) said Thank You: kamisan
Last edit: 1 month 1 week ago by geordan. Reason: Formatting
1 month 1 week ago #38803

Please Log in or Create an account to join the conversation.

  • Posts: 85
  • Thank you received: 5

Replied by kamisan on topic vappasswd

Thanks geordan, I'll give that a try. It's funny I was just talking highly of Astroberry/INDI/Ekos to some new friends at an Astronomy club. It's good KARMA methinks.
1 month 1 week ago #38806

Please Log in or Create an account to join the conversation.

  • Posts: 85
  • Thank you received: 5

Replied by kamisan on topic vappasswd

Hi geordan,

I have a Model 3B. I looked at your changes at GitHub so as to understand. I decided to make just the essential changes to the three lines in vappasswd and vaprename from "/etc/hostapd/hostapd.conf" to "/etc/hostapd/hostapd_3b.conf" It works perfectly!

One thing to be aware of though, there is odd behavior when using an '=' equal sign in the password. For example if I run vappasswd to change the password to 'pi=' and then look what it wrote, it says: 'wpa_passphrase=pi='. Then if I run vappasswd and change it to 'foo' then it says: 'wpa_passphrase=foo='. In order to remove the equal sign I had to edit hostapd_3b.conf.

Thanks very much. This is perfect timing. I am going mobile to a star party in a few weeks and I was concerned that someone else might be running Astroberry.
1 month 1 week ago #38808

Please Log in or Create an account to join the conversation.

Moderators: Kaczorek
Time to create page: 0.644 seconds