Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
disable user from cli
« previous
next »
Print
Pages: [
1
]
Author
Topic: disable user from cli (Read 919 times)
naltalef
Newbie
Posts: 38
Karma: 2
disable user from cli
«
on:
January 09, 2023, 04:26:00 pm »
Hi. Good 2023 for all !
I would like to know if it is possible change user properties from the command line.
I have a client with about 200 openvpn users and the idea is to disable all users who have not used openvpn for a while, running a script by cron each week.
Many thanks in advance
Norberto
Logged
EdwinKM
Full Member
Posts: 155
Karma: 5
Re: disable user from cli
«
Reply #1 on:
January 09, 2023, 07:29:06 pm »
You checked the opnsense API?
https://docs.opnsense.org/development/api.html
There also some Ansible libraries supporting opnsense.
Logged
franco
Administrator
Hero Member
Posts: 17660
Karma: 1611
Re: disable user from cli
«
Reply #2 on:
January 10, 2023, 03:08:08 pm »
There is no user/group API yet. We're discussion inclusion within the year but it hasn't been decided yet. IPsec is the first one to get an API (with 23.1) and then perhaps OpenVPN will follow in 23.7...
Cheers,
Franco
Logged
naltalef
Newbie
Posts: 38
Karma: 2
Re: disable user from cli
«
Reply #3 on:
January 12, 2023, 09:18:43 pm »
Thanks for the answers.
A custom script would be a workaround while the API for users and groups is not available.
Any suggestion to take as a base?
As far as I can see, the value <disabled>1</disabled> is added in conf.xml and the password in master.password is changed to *LOCKED**
Many thanks
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
disable user from cli