openvpn-install icon indicating copy to clipboard operation
openvpn-install copied to clipboard

Shows only 'user' successful authentication in logs

Open potatonc opened this issue 4 years ago • 3 comments

I have run the command :

cat openvpn.log | grep -i "Username/Password authentication succeeded for username"

and this is the result :

Fri Aug  7 05:28:00 2020 zagar/127.0.0.1:34276 TLS: Username/Password authentication succeeded for username 'zagar' [CN SET]
Fri Aug  7 05:31:28 2020 127.0.0.1:37616 TLS: Username/Password authentication succeeded for username 'agungcendol' [CN SET]
Fri Aug  7 05:31:54 2020 ulum/127.0.0.1:34408 TLS: Username/Password authentication succeeded for username 'ulum' [CN SET]
Fri Aug  7 05:35:36 2020 127.0.0.1:37928 TLS: Username/Password authentication succeeded for username 'vidia' [CN SET]
Fri Aug  7 05:38:06 2020 127.0.0.1:38092 TLS: Username/Password authentication succeeded for username 'erji' [CN SET]
Fri Aug  7 05:38:49 2020 127.0.0.1:38156 TLS: Username/Password authentication succeeded for username 'hadijah' [CN SET]

how can i get only the 'user_name' result in the bash command?

potatonc avatar Aug 06 '20 22:08 potatonc

That works for me:

➜  ~ cat openvpn.log | grep -i "Username/Password authentication succeeded for username" | cut -f 2 -d "'"
zagar
agungcendol
ulum
vidia
erji
hadijah

angristan avatar Aug 08 '20 09:08 angristan

That works for me:

➜  ~ cat openvpn.log | grep -i "Username/Password authentication succeeded for username" | cut -f 2 -d "'"
zagar
agungcendol
ulum
vidia
erji
hadijah

I tried, but it doesn't work.

cat /etc/openvpn/openvpn.log | grep -i "Username/Password authentication succeeded for username" | cut -f 2 -d "'"

Binary file (standard input) matches

potatonc avatar Aug 09 '20 01:08 potatonc

/var/log/openvpn/status.log location ?

hellresistor avatar Aug 26 '20 14:08 hellresistor