Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to solve "OpenVPN requires super user privileges" #49

Open
LOSTtokens opened this issue Jun 21, 2020 · 6 comments
Open

How to solve "OpenVPN requires super user privileges" #49

LOSTtokens opened this issue Jun 21, 2020 · 6 comments

Comments

@LOSTtokens
Copy link

LOSTtokens commented Jun 21, 2020

when I use "python3 crowbar.py -b openvpn -s 172.16.1.2/32 -p 1194 -m /root/WWW/vpn/client.ovpn -U /root/WWW/vpn/userlist -c 123456"

response:
2020-06-21 03:35:44 START
2020-06-21 03:35:44 Crowbar v0.4.1
OpenVPN requires super user privileges

image

@EmreOvunc
Copy link

You got this error due to the control in openvpn module. So, your user's SUDO_UID does not exist in environ.keys()'s output.

...
if not 'SUDO_UID' in os.environ.keys():
            mess = "OpenVPN requires super user privileges"
...

You can check it by using env command in Kali. If you do not see SUDO_UID parameter, you can try it with sudo.

Note: You can see the difference from the picture below.
alt tag

@LOSTtokens
Copy link
Author

LOSTtokens commented Jul 1, 2020

You got this error due to the control in openvpn module. So, your user's SUDO_UID does not exist in environ.keys()'s output.

...
if not 'SUDO_UID' in os.environ.keys():
            mess = "OpenVPN requires super user privileges"
...

You can check it by using env command in Kali. If you do not see SUDO_UID parameter, you can try it with sudo.

Note: You can see the difference from the picture below.
alt tag

but I AM root,Indeed, what should I do?
image
image

@EmreOvunc
Copy link

There are many solutions to solve it. But, two methods come to my mind quickly.
1. Run it with sudo

sudo python3 crowbar.py

2. You can change the line of the code

if not 'SUDO_UID' in os.environ.keys():

to

if 'SUDO_UID' in os.environ.keys():

@LOSTtokens
Copy link
Author

There are many solutions to solve it. But, two methods come to my mind quickly.
1. Run it with sudo

sudo python3 crowbar.py

2. You can change the line of the code

if not 'SUDO_UID' in os.environ.keys():

to

if 'SUDO_UID' in os.environ.keys():

I use the second method, but there is to enter manually "Enter Auth Username"
image

@EmreOvunc
Copy link

EmreOvunc commented Jul 1, 2020

There are many solutions to solve it. But, two methods come to my mind quickly.
1. Run it with sudo

sudo python3 crowbar.py

2. You can change the line of the code

if not 'SUDO_UID' in os.environ.keys():

to

if 'SUDO_UID' in os.environ.keys():

I use the second method, but there is to enter manually "Enter Auth Username"
image

I think it is about your client.ovpn config file. I suggest you to remove auth-user-pass line in config and try again.

@LOSTtokens
Copy link
Author

May I ask how to edite client.ovpn , is there a template?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants