LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-31-2020, 09:22 AM   #31
andigena
Member
 
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141

Rep: Reputation: 66

8.8.8.8 is the Google public DNS server and is fine.
As for the permission issue, it's odd. You were able to execute the script through sudo, so it's not a problem with sudo access. Can you upload the screenshot you're talking about to Imgur and paste the link here?
 
Old 01-31-2020, 09:32 AM   #32
affeman
Member
 
Registered: Jan 2020
Posts: 37

Original Poster
Rep: Reputation: Disabled
I'm looking for answer on the forum but find nothing... how do I add a picture here?
 
Old 01-31-2020, 11:01 AM   #33
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
goto advanced mode (when you write a new post) and click on attachment (next to smiley)
 
Old 01-31-2020, 11:14 AM   #34
affeman
Member
 
Registered: Jan 2020
Posts: 37

Original Poster
Rep: Reputation: Disabled
Click image for larger version

Name:	yufi account permissions.png
Views:	15
Size:	27.2 KB
ID:	32427
 
Old 01-31-2020, 11:31 AM   #35
andigena
Member
 
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141

Rep: Reputation: 66
Okay, not an issue with sudo capabilites. Take a look at this.
 
Old 01-31-2020, 12:32 PM   #36
affeman
Member
 
Registered: Jan 2020
Posts: 37

Original Poster
Rep: Reputation: Disabled
I managed to fix the sudo issue so now I can do whatever I need to do. So, logged in as root and executed this command for the VPN to work:
Quote:
sudo echo 'nameserver 185.228.168.168' > /etc/resolv.conf
And I started the script again command:

Quote:

sudo ./hma-openvpn.sh
Then this fell out:
Quote:
yufi@yufi-K53SM:~/Desktop/hma-linux$ sudo ./hma-openvpn.sh


==============================
| __ ____ ______ __ |
| / / / / |/ / | / / |
| / /_/ / /|_/ / /| | / / |
| / __ / / / / ___ |/_/ |
| /_/ /_/_/ /_/_/ |_(_) |
| |
| HMA! OpenVPN Script v0.5 |
==============================

-> https://hidemyass.com/vpn
-> https://support.hidemyass.com

- Available switches:
./hma-openvpn.sh -h = Show help
./hma-openvpn.sh -d = Daemonize OpenVPN
./hma-openvpn.sh -f = tests for and connects you to the fastest server
./hma-openvpn.sh -t = tests for and shows top 10 fastest servers
./hma-openvpn.sh -s = Shows OpenVPN status & IP
./hma-openvpn.sh -u = Updates this script

- This script requires the following packages:
curl, openvpn, wget, dialog

- Getting HMA! Pro VPN serverlist...

























Exiting script...

yufi@yufi-K53SM:~/Desktop/hma-linux$
 
Old 01-31-2020, 12:33 PM   #37
affeman
Member
 
Registered: Jan 2020
Posts: 37

Original Poster
Rep: Reputation: Disabled
So I'll contact the support again.
 
Old 01-31-2020, 12:43 PM   #38
affeman
Member
 
Registered: Jan 2020
Posts: 37

Original Poster
Rep: Reputation: Disabled
If I'm not permitted to view its content, is that also connected to why script is not working? That the script is not allowed to view the content of resolv.conf as I'm running it?
Quote:
yufi@yufi-K53SM:~/Desktop/hma-linux$ sudo echo 'nameserver 185.228.168.168' > /etc/resolv.conf
bash: /etc/resolv.conf: Permission denied
yufi@yufi-K53SM:~/Desktop/hma-linux$
 
Old 01-31-2020, 12:48 PM   #39
andigena
Member
 
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141

Rep: Reputation: 66
- You're supposed to modify /etc/resolv.conf while the script is running.
- Why did you choose that DNS server?
- You can't view the content of /etc/resolv.conf? "cat /etc/resolv.conf" doesn't work? Did you follow the directions in the link I sent you?
- Install the missing packages:
Code:
sudo apt install curl openvpn wget dialog
 
Old 01-31-2020, 12:59 PM   #40
affeman
Member
 
Registered: Jan 2020
Posts: 37

Original Poster
Rep: Reputation: Disabled
The echo command is an output maker so to speak, isn't it?
Quote:
sudo echo 'nameserver 8.8.8.8' > /etc/resolv.conf
I have not come to that point yet where I edit files in the terminal.

I did run "sudo apt install curl openvpn wget dialog" but I had everything already.
 
Old 01-31-2020, 06:31 PM   #41
andigena
Member
 
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141

Rep: Reputation: 66
Cat in its usage shown above doesn't edit a file, it only outputs it.
 
Old 02-01-2020, 12:55 AM   #42
affeman
Member
 
Registered: Jan 2020
Posts: 37

Original Poster
Rep: Reputation: Disabled
Dude, I had to figure out some real shit all by myself here ;-)

The "software" HMA has, to make my computer hide its ip and such, IS the SCRIPT!!! I didn't hear that anywhere by anyone and that is just f'ng ground breaking to me. You know, I expected the script to do something and leave something behind or leave some settings in my system so that VPN works once and for all, as I THOUGHT IT WOULD! Didn't I make it clear I'm a novis at this, a noob!? LOL

To realize that this itty bitty tiny little script is the actual ENGINE here made me face palm myself, AGAIN!, only this time I figure it's on you HAHA. You are so used to Linux, UNIX and the like that you could not see that I was looking for something more than just a running script in terminal since I come from Windows where we neither have or don't do things like this. When I had MSDOS 6.22 I was doing things like this but that was ages ago :-D

So now I'm figuring if I shouldn't give coding a try and for starters make this sorry little script some clothes, and making it do something more without me having to do it manually every day. Is that how you spark too?

In retrospect, this has been educating, and funny actually. Now I know how it works!

Thanks a million for your help on this, there is nothing more to do now I think.

Cheers!
LOL
 
Old 02-01-2020, 04:47 AM   #43
andigena
Member
 
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141

Rep: Reputation: 66
Yeah, I don't think there was really much documentation about it on the HMA website, so I guess I can understand that. It's been a while since I was as new to Linux as you, so maybe I'm out of touch.

If you want to automate the script's operation, look into cron. It's a preinstalled program that can schedule tasks, including during the boot process, so if you schedule the script to run @reboot you should always be connected to the VPN unless you manually kill the process.

I'll leave how to do that up to you, since you seem willing to do some scripting.
 
Old 02-01-2020, 06:57 AM   #44
affeman
Member
 
Registered: Jan 2020
Posts: 37

Original Poster
Rep: Reputation: Disabled
I suspect that I'm not getting out of setting the passwords here and there during automated start so I'll just go with the manual proceeding until either I make something or the HMA comes up with a better solution.

Coding, scripting, same but different?
 
Old 02-01-2020, 09:40 AM   #45
andigena
Member
 
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141

Rep: Reputation: 66
Quote:
Originally Posted by affeman View Post
I suspect that I'm not getting out of setting the passwords here and there during automated start so I'll just go with the manual proceeding until either I make something or the HMA comes up with a better solution.
If you edit root's crontab instead of a user crontab, I don't believe there will be permissions issues.
Quote:
Coding, scripting, same but different?
https://stackoverflow.com/questions/...ting-vs-coding
Bash code = scripting, C code = coding. Essentially.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorry, user deploy is not allowed to execute '/bin/mkdir 1' as root on localhost sunnysthakur Linux - General 1 09-08-2012 04:42 PM
Method Not Allowed: The requested method POST is not allowed for the URL /writedhcp.p WiWa Linux - Networking 15 01-06-2011 01:20 PM
sudo: "user not allowed to execute" jjonas Linux - Security 6 07-05-2007 05:46 AM
Tracking user logins that was allowed and not allowed eswanepoel Linux - Security 3 08-02-2006 04:37 AM
SlackWare :Method Not Allowed The requested method POST is not allowed for the URL slack31337 Linux - Software 0 04-08-2006 06:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration