crowbar icon indicating copy to clipboard operation
crowbar copied to clipboard

How to solve "OpenVPN requires super user privileges"

Open LOSTtokens opened this issue 5 years ago • 6 comments

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

LOSTtokens avatar Jun 21 '20 07:06 LOSTtokens

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

EmreOvunc avatar Jun 24 '20 20:06 EmreOvunc

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

LOSTtokens avatar Jul 01 '20 09:07 LOSTtokens

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():

EmreOvunc avatar Jul 01 '20 09:07 EmreOvunc

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

LOSTtokens avatar Jul 01 '20 15:07 LOSTtokens

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.

EmreOvunc avatar Jul 01 '20 16:07 EmreOvunc

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

LOSTtokens avatar Jul 05 '20 11:07 LOSTtokens