KKeine Bearbeitungszusammenfassung |
K (Textersetzung - „#WEITERLEITUNG(.*)Preview1260\n“ durch „“) Markierung: Weiterleitung entfernt |
||
(3 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
Zeile 3: | Zeile 3: | ||
{{#vardefine:headerIcon|spicon-utm}} | {{#vardefine:headerIcon|spicon-utm}} | ||
{{:UTM/CLI/User.lang}} | {{:UTM/CLI/User.lang}} | ||
{{var | neu--korrektur | |||
| Korrektur Syntax [[#user_attribute_otpsecret | user attribute otpsecret]] | |||
| Correction syntax [[#user_attribute_otpsecret | user attribute otpsecret]] }} | |||
</div>{{Select_lang}}{{TOC2}} | </div>{{Select_lang}}{{TOC2}} | ||
{{Header| | {{Header|12.6.0| zuletzt= 09.2023| | ||
|[[UTM/CLI/User_v11 | v11]] | * {{#var:neu--korrektur}} | ||
| [[UTM/CLI/User_12.5.1 | v12.5.1]] | |||
[[UTM/CLI/User_v11 | v11]] | |||
|{{Menu|Extras|CLI}} | |{{Menu|Extras|CLI}} | ||
}} | }} | ||
Zeile 16: | Zeile 22: | ||
{| class="sptable2 pd5 sortable table-hover Einrücken" | {| class="sptable2 pd5 sortable table-hover Einrücken" | ||
|- | |- | ||
! {{#var:Befehl}} !! | ! {{#var:Befehl}} !! Parameter !! {{#var:desc}}!! {{#var:Beispiel}} | ||
|- | |- | ||
Zeile 37: | Zeile 43: | ||
| {{#var:user get alle Benutzer}} {{code|user get}} | | {{#var:user get alle Benutzer}} {{code|user get}} | ||
|- | |- | ||
| name || ''' | | name || '''Optional.''' {{#var:name--desc}} | ||
| {{#var:user get einzelner Benutzer}} {{code| user get name "benutzer1"}} | | {{#var:user get einzelner Benutzer}} {{code| user get name "benutzer1"}} | ||
|- | |- | ||
Zeile 58: | Zeile 64: | ||
| | | | ||
| {{#var:user set--desc}} | | {{#var:user set--desc}} | ||
| rowspan="4"| {{code| user set id "183" groups {{#var:vpn-benutzer}}}} | | rowspan="4"| {{code|user set id "183" groups {{#var:vpn-benutzer}} }} | ||
|- | |- | ||
| id || {{#var:id--desc}} | | id || {{#var:id--desc}} | ||
|- | |- | ||
| name || ''' | | name || '''Optional.''' {{#var:name--desc}} | ||
|- | |- | ||
| groups || {{#var:groups--desc}} | | groups || {{#var:groups--desc}} | ||
Zeile 90: | Zeile 96: | ||
|- | |- | ||
| rowspan="3"| {{h4|user checkotp}} user checkotp | | rowspan="3" | {{h4|user checkotp}} user checkotp | ||
| | | | ||
| {{#var:user checkotp--desc}} | | {{#var:user checkotp--desc}} | ||
Zeile 108: | Zeile 114: | ||
|- | |- | ||
| rowspan="2"| {{h3| user attribute}}{{h4| user attribute get}} '''user attribute''' get | | rowspan="2" | {{h3| user attribute}} {{h4| user attribute get}} '''user attribute''' get | ||
| | | | ||
| {{#var:user attribute get--desc}} {{Einblenden|{{#var:Details}}|{{#var:hide}}|true|dezent}} | | {{#var:user attribute get--desc}} {{Einblenden|{{#var:Details}}|{{#var:hide}}|true|dezent}} | ||
Zeile 123: | Zeile 129: | ||
| {{code| user attribute get}} | | {{code| user attribute get}} | ||
|- | |- | ||
| name || ''' | | name || '''Optional.''' {{#var:name--desc}} || {{code| user attribute get name "benutzer1"}} | ||
|- | |- | ||
|- | |- | ||
| rowspan="4"| {{h4| user attribute set}} user attribute set | | rowspan="4" | {{h4| user attribute set}} user attribute set | ||
| | | | ||
| Ändert die Attribute des Benutzers | | Ändert die Attribute des Benutzers | ||
| rowspan="4"| {{code| user attribute set name "admin" attribute "password_change" value "1"}} | | rowspan="4" | {{code|user attribute set name "admin" attribute "password_change" value "1"}} | ||
|- | |- | ||
| user || {{#var:name--desc}} | | user || {{#var:name--desc}} | ||
|- | |- | ||
| attribute || {{#var:attribute--desc}} {{Einblenden|{{#var:Details}}|{{#var:hide}}|true|dezent}} | | attribute || {{#var:attribute--desc}} {{Einblenden| {{#var:Details}} | {{#var:hide}} |true|dezent}} | ||
{| class="sptable blank" | {| class="sptable blank" | ||
|- | |- | ||
|mailfilter_download_attachments_filtered | | mailfilter_download_attachments_filtered | ||
|- | |- | ||
|mailfilter_email_addresses | | mailfilter_email_addresses | ||
|- | |- | ||
|openvpn_certificate | | openvpn_certificate | ||
|- | |- | ||
|openvpn_client_download | | openvpn_client_download | ||
|- | |- | ||
|openvpn_gateway | | openvpn_gateway | ||
|- | |- | ||
|openvpn_name | | openvpn_name | ||
|- | |- | ||
|openvpn_redirectgateway | | openvpn_redirectgateway | ||
|- | |- | ||
|password_change | | password_change | ||
|- | |- | ||
|password_chars_case | | password_chars_case | ||
|- | |- | ||
|password_chars_numbers | | password_chars_numbers | ||
|- | |- | ||
|password_chars_special | | password_chars_special | ||
|- | |- | ||
|password_length | | password_length | ||
|- | |- | ||
|vpn_l2tp_ip | | vpn_l2tp_ip | ||
|- | |- | ||
|vpn_openvpn_ip | | vpn_openvpn_ip | ||
|- | |- | ||
|vpn_pptp_ip | | vpn_pptp_ip | ||
|- | |- | ||
|wake_on_lan_hosts | | wake_on_lan_hosts | ||
|- | |- | ||
|} | |} | ||
Zeile 175: | Zeile 181: | ||
|- | |- | ||
| rowspan="2"| {{h4|user attribute otpsecret}} user attribute otpsecret | | rowspan="2" | {{h4|user attribute otpsecret}} user attribute otpsecret | ||
| | | | ||
| {{#var:user attribute otpsecret--desc}} | | {{#var:user attribute otpsecret--desc}} | ||
| rowspan="2"| {{code| user attribute otpsecret user "user1"}} | | rowspan="2" | {{code| user attribute otpsecret name "user1"}} {{Hinweis-box||gr|12.5.1|status=update}} {{code|spcli user attribute otpsecret name "user1"}} | ||
|- | |- | ||
| user || {{#var:name--desc}} | | user || {{#var:name--desc}} | ||
Zeile 184: | Zeile 190: | ||
|- | |- | ||
| {{h3|user captiveportal}}{{h4|user captiveportal get}} '''user captiveportal''' get | | {{h3|user captiveportal}} {{h4|user captiveportal get}} '''user captiveportal''' get | ||
| – | | – | ||
| {{#var:user captiveportal get--desc}} | | {{#var:user captiveportal get--desc}} | ||
Zeile 191: | Zeile 197: | ||
|- | |- | ||
| rowspan="4"| {{h4|user captiveportal new}} user captiveportal new | | rowspan="4" | {{h4|user captiveportal new}} user captiveportal new | ||
| | | | ||
| {{#var:user captiveportal new--desc}} | | {{#var:user captiveportal new--desc}} | ||
| rowspan="4"| {{code|user captiveportal new name "CP-User" password "InSecure" expirydate "24:00"}} | | rowspan="4" | {{code|user captiveportal new name "CP-User" password "InSecure" expirydate "24:00"}} | ||
|- | |- | ||
| name || {{#var:captiveportal name--desc}} | | name || {{#var:captiveportal name--desc}} | ||
Zeile 204: | Zeile 210: | ||
|- | |- | ||
| rowspan="4"| {{h4|user captiveportal set}} user captiveportal set | | rowspan="4" | {{h4|user captiveportal set}} user captiveportal set | ||
| | | | ||
| {{#var:user captiveportal set--desc}} | | {{#var:user captiveportal set--desc}} | ||
| rowspan="4"| {{#var: Änderung Passwort}} {{code|user captiveportal set name "CP-User" password "CP-InSecure"}}<br>{{#var: Änderung Ablaufdatum}} {{code|user captiveportal set name "CP-User" expirydate "12:00"}} | | rowspan="4" | {{#var: Änderung Passwort}} {{code|user captiveportal set name "CP-User" password "CP-InSecure"}}<br>{{#var: Änderung Ablaufdatum}} {{code|user captiveportal set name "CP-User" expirydate "12:00"}} | ||
|- | |- | ||
| name || {{#var:captiveportal name--desc}} | | name || {{#var:captiveportal name--desc}} | ||
Zeile 217: | Zeile 223: | ||
|- | |- | ||
| rowspan="2"| {{h4|user captiveportal delete}} user captiveportal delete | | rowspan="2" | {{h4|user captiveportal delete}} user captiveportal delete | ||
| | | | ||
| {{#var:user captiveportal delete--desc}} | | {{#var:user captiveportal delete--desc}} | ||
| rowspan="2"| {{code| user captiveportal delete name "CP-User"}} | | rowspan="2" | {{code| user captiveportal delete name "CP-User"}} | ||
|- | |- | ||
| name || {{#var:captiveportal name--desc}} | | name || {{#var:captiveportal name--desc}} | ||
Zeile 226: | Zeile 232: | ||
|- | |- | ||
| {{h3|user group}}{{h4|user group get}} '''user group''' get | | {{h3|user group}} {{h4|user group get}} '''user group''' get | ||
| – | | – | ||
| {{#var:user group get--desc}} {{Einblenden|{{#var:Details}}|{{#var:hide}}|true|dezent}} | | {{#var:user group get--desc}} {{Einblenden| {{#var:Details}} | {{#var:hide}} |true|dezent}} | ||
{| class="sptable" | {| class="sptable" | ||
! {{#var:Wert}} !! {{#var:desc}} | ! {{#var:Wert}} !! {{#var:desc}} | ||
Zeile 247: | Zeile 253: | ||
|- | |- | ||
| rowspan="3"| {{h4|user group new}} user group new | | rowspan="3" | {{h4|user group new}} user group new | ||
| | | | ||
| {{#var:user group new--desc}} | | {{#var:user group new--desc}} | ||
| rowspan="3"| {{code|user group new name "proxy-user" permission "HTTP_PROXY"}} | | rowspan="3" | {{code|user group new name "proxy-user" permission "HTTP_PROXY"}} | ||
|- | |- | ||
| name || {{#var:group name--desc}} | | name || {{#var:group name--desc}} | ||
Zeile 257: | Zeile 263: | ||
{| class="sptable blank" | {| class="sptable blank" | ||
|- | |- | ||
|MAILDIGESTS | | MAILDIGESTS | ||
|- | |- | ||
|ADMIN | | ADMIN | ||
|- | |- | ||
|VPN_PPTP | | VPN_PPTP | ||
|- | |- | ||
|VPN_L2TP | | VPN_L2TP | ||
|- | |- | ||
|MAILFILTER_ADMIN | | MAILFILTER_ADMIN | ||
|- | |- | ||
|HTTP_PROXY | | HTTP_PROXY | ||
|- | |- | ||
|WEB_USER | | WEB_USER | ||
|- | |- | ||
|VPN_OPENVPN | | VPN_OPENVPN | ||
|- | |- | ||
|MAIL_RELAY | | MAIL_RELAY | ||
|- | |- | ||
|IPSEC_XAUTH | | IPSEC_XAUTH | ||
|- | |- | ||
|VPN_CLIENTLESS | | VPN_CLIENTLESS | ||
|- | |- | ||
|} | |} | ||
Zeile 283: | Zeile 289: | ||
|- | |- | ||
| rowspan="4"| {{h4|user group set}} user group set | | rowspan="4" | {{h4|user group set}} user group set | ||
| | | | ||
| {{#var:user group set--desc}} | | {{#var:user group set--desc}} | ||
| rowspan="4"| {{code| user group set id "194" permission [ | | rowspan="4" | {{code| user group set id "194" permission [ WEB_USER VPN_CLIENTLESS ]}} | ||
|- | |- | ||
| id || {{#var:group id--desc}} | | id || {{#var:group id--desc}} | ||
|- | |- | ||
| name || ''' | | name || '''Optional.''' {{#var:group name--desc}} | ||
|- | |- | ||
| permission || {{#var:group permission--desc}} {{Einblenden|{{#var:Details}}|{{#var:hide}}|true|dezent}} | | permission || {{#var:group permission--desc}} {{Einblenden| {{#var:Details}} | {{#var:hide}} |true|dezent}} | ||
{| class="sptable blank" | {| class="sptable blank" | ||
|- | |- | ||
|MAILDIGESTS | | MAILDIGESTS | ||
|- | |- | ||
|ADMIN | | ADMIN | ||
|- | |- | ||
|VPN_PPTP | | VPN_PPTP | ||
|- | |- | ||
|VPN_L2TP | | VPN_L2TP | ||
|- | |- | ||
|MAILFILTER_ADMIN | | MAILFILTER_ADMIN | ||
|- | |- | ||
|HTTP_PROXY | | HTTP_PROXY | ||
|- | |- | ||
|WEB_USER | | WEB_USER | ||
|- | |- | ||
|VPN_OPENVPN | | VPN_OPENVPN | ||
|- | |- | ||
|MAIL_RELAY | | MAIL_RELAY | ||
|- | |- | ||
|IPSEC_XAUTH | | IPSEC_XAUTH | ||
|- | |- | ||
|VPN_CLIENTLESS | | VPN_CLIENTLESS | ||
|- | |- | ||
|} | |} | ||
Zeile 321: | Zeile 327: | ||
|- | |- | ||
| rowspan="3"| {{h4|user group delete}} user group delete | | rowspan="3" | {{h4|user group delete}} user group delete | ||
| | | | ||
| {{#var:user group delete--desc}} | | {{#var:user group delete--desc}} | ||
| rowspan="3"| {{code|user group delete id "194"}} | | rowspan="3" | {{code|user group delete id "194"}} | ||
|- | |- | ||
| id || {{#var:group id--desc}} | | id || {{#var:group id--desc}} | ||
Zeile 334: | Zeile 340: | ||
| {{h4|user group attribute get}} user group attribute get | | {{h4|user group attribute get}} user group attribute get | ||
| | | | ||
| {{#var:user group attribute get--desc}} {{Einblenden|{{#var:Details}}|{{#var:hide}}|true|dezent}} | | {{#var:user group attribute get--desc}} {{Einblenden| {{#var:Details}} | {{#var:hide}} |true|dezent}} | ||
{| class="sptable" | {| class="sptable" | ||
! {{#var:Wert}} !! {{#var:desc}} | ! {{#var:Wert}} !! {{#var:desc}} | ||
Zeile 349: | Zeile 355: | ||
|- | |- | ||
| rowspan="4"| {{h4|user group attribute set}} user group attribute set | | rowspan="4" | {{h4|user group attribute set}} user group attribute set | ||
| | | | ||
| {{#var:user group attribute set--desc}} | | {{#var:user group attribute set--desc}} | ||
| rowspan="4"| {{code|user group attribute set name "Userinterface" attribute "openvpn_client_download" value "0"}} | | rowspan="4" | {{code|user group attribute set name "Userinterface" attribute "openvpn_client_download" value "0"}} | ||
|- | |- | ||
| name || {{#var:group name--desc}} | | name || {{#var:group name--desc}} | ||
Zeile 362: | Zeile 368: | ||
|- | |- | ||
| rowspan="3"| {{h4|user group attribute delete}} user group attribute delete | | rowspan="3" | {{h4|user group attribute delete}} user group attribute delete | ||
| | | | ||
| {{#var:user group atttribute delete--desc}} | | {{#var:user group atttribute delete--desc}} | ||
| rowspan="3"| {{code|user group attribute delete name "Userinterface" attribute "openvpn_client_download"}} | | rowspan="3" | {{code|user group attribute delete name "Userinterface" attribute "openvpn_client_download"}} | ||
|- | |- | ||
| name || {{#var:group name--desc}} | | name || {{#var:group name--desc}} | ||
|- | |- | ||
| attribute || {{#var:group attribute--desc}} {{Einblenden|{{#var:Details}}|{{#var:hide}}|true|dezent}} | | attribute || {{#var:group attribute--desc}} {{Einblenden| {{#var:Details}} | {{#var:hide}} |true|dezent}} | ||
{| class="sptable blank" | {| class="sptable blank" | ||
|- | |- | ||
Zeile 390: | Zeile 396: | ||
|- | |- | ||
| rowspan="6"| {{h3| user support new}} '''user support new''' | | rowspan="6" | {{h3|user support new}} '''user support new''' | ||
| | | | ||
| {{#var:user support new--desc}} | | {{#var:user support new--desc}} | ||
| rowspan="6"| {{code| user support new name "Support" password "InSecure" groups "User" expirydate "24:00" }} | | rowspan="6" | {{code| user support new name "Support" password "InSecure" groups "User" expirydate "24:00" }} | ||
|- | |- | ||
| name || {{#var:name--desc}} | | name || {{#var:name--desc}} | ||
Zeile 403: | Zeile 409: | ||
| expirydate || {{#var:expirydate--desc}} | | expirydate || {{#var:expirydate--desc}} | ||
|- | |- | ||
| flags || ''' | | flags || '''Optional.''' {{#var:flags--desc}} | ||
|- | |- | ||
|} | |} |
Aktuelle Version vom 16. Januar 2024, 15:14 Uhr
Benutzerverwaltung mit dem CLI-Befehl user
Letzte Anpassung zur Version: 12.6.0
Neu:
Beispiel: user set id "10" groups [ ] (Leerzeichen zwischen den Klammern beachten!)
Sollen mehrere Werte in einem Parameter übergeben werden, müssen diese in Anführungszeichen gesetzt werden und von eckigen Klammern mit einem Leerzeichen Abstand umschlossen werden.
Beispiel: user set id "10" groups [ "Gruppe1" "Gruppe2" "Gruppe3" ]
Befehl | Parameter | Beschreibung | Beispiel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
useruser getuser get |
Zeigt alle oder einzelne Benutzer an
|
Alle Benutzer anzeigen: user get | |||||||||||||||
name | Optional. Name des Benutzeraccounts | Benutzer "benutzer1" anzeigen: user get name "benutzer1" | |||||||||||||||
user newuser new |
Erstellt einen neuen Benutzer | user new name "benutzer2" password "insecure" groups "ssl-user" | |||||||||||||||
name | Name des Benutzeraccounts | ||||||||||||||||
password | Passwort des Benutzeraccounts | ||||||||||||||||
groups | Gruppe des Benutzeraccounts | ||||||||||||||||
user setuser set |
Ändert Benutzereinstellungen | user set id "183" groups vpn-benutzer | |||||||||||||||
id | ID des Benutzeraccounts | ||||||||||||||||
name | Optional. Name des Benutzeraccounts | ||||||||||||||||
groups | Gruppe des Benutzeraccounts | ||||||||||||||||
user deleteuser delete |
Löscht einen Benutzer. Ein Parameter hinreichend. | user delete id "193" | |||||||||||||||
id | ID des Benutzeraccounts | ||||||||||||||||
name | Name des Benutzeraccounts | ||||||||||||||||
user checkuser check |
Überprüft, ob ein Benutzer Mitglied einer bestimmten Gruppe ist | user check name "benutzer1" groups "vpn-user" | |||||||||||||||
name | Name des Benutzeraccounts | ||||||||||||||||
groups | Gruppe des Benutzeraccounts | ||||||||||||||||
user checkotpuser checkotp |
Überprüfen des OTP Code aus dem Token | user checkotp name "user1" code "1234562" | |||||||||||||||
name | Name des Benutzeraccounts | ||||||||||||||||
code | OTP-Code, der auf Gültigkeit überprüft werden soll | ||||||||||||||||
user whouser who |
– | Zeigt an, welcher Benutzer verbunden und eingeloggt ist | user who | ||||||||||||||
user attributeuser attribute getuser attribute get |
Zeigt die Attribute eines oder aller Benutzer an
|
user attribute get | |||||||||||||||
name | Optional. Name des Benutzeraccounts | user attribute get name "benutzer1" | |||||||||||||||
user attribute setuser attribute set |
Ändert die Attribute des Benutzers | user attribute set name "admin" attribute "password_change" value "1" | |||||||||||||||
user | Name des Benutzeraccounts | ||||||||||||||||
attribute | Zugewiesene Attribute des Benutzeraccounts
| ||||||||||||||||
value | Wert des Attributs | ||||||||||||||||
user attribute otpsecretuser attribute otpsecret |
Generiert einen neuen OTP shared secret code | user attribute otpsecret name "user1" spcli user attribute otpsecret name "user1"
| |||||||||||||||
user | Name des Benutzeraccounts | ||||||||||||||||
user captiveportaluser captiveportal getuser captiveportal get |
– | Auflistung aller Captive Portal Benutzeraccounts | user captiveportal get | ||||||||||||||
user captiveportal newuser captiveportal new |
Erstellt einen Captive Portal Benutzeraccounts | user captiveportal new name "CP-User" password "InSecure" expirydate "24:00" | |||||||||||||||
name | Name des Captive Portal Benutzeraccounts | ||||||||||||||||
password | Passwort des Captive Portal Benutzeraccounts | ||||||||||||||||
expirydate | Datum des Ablaufs | ||||||||||||||||
user captiveportal setuser captiveportal set |
Änderung des Passwortes oder des Ablaufdatums des Captive Portal Benutzeraccounts | Änderung Passwort: user captiveportal set name "CP-User" password "CP-InSecure" Änderung Ablaufdatum: user captiveportal set name "CP-User" expirydate "12:00" | |||||||||||||||
name | Name des Captive Portal Benutzeraccounts | ||||||||||||||||
password | Passwort des Captive Portal Benutzeraccounts | ||||||||||||||||
expirydate | Datum des Ablaufs | ||||||||||||||||
user captiveportal deleteuser captiveportal delete |
Löscht einen Captive Portal Benutzeraccount | user captiveportal delete name "CP-User" | |||||||||||||||
name | Name des Captive Portal Benutzeraccounts | ||||||||||||||||
user groupuser group getuser group get |
– | Zeigt die Gruppen an
|
user group get | ||||||||||||||
user group newuser group new |
Erstellt eine neue Gruppe | user group new name "proxy-user" permission "HTTP_PROXY" | |||||||||||||||
name | Name der Gruppe | ||||||||||||||||
permission | Berechtigung der Gruppe
| ||||||||||||||||
user group setuser group set |
Ändert die Einstellungen einer Gruppe | user group set id "194" permission [ WEB_USER VPN_CLIENTLESS ] | |||||||||||||||
id | ID der Gruppe | ||||||||||||||||
name | Optional. Name der Gruppe | ||||||||||||||||
permission | Berechtigung der Gruppe
| ||||||||||||||||
user group deleteuser group delete |
Löscht eine Gruppe. Ein Parameter hinreichend. | user group delete id "194" | |||||||||||||||
id | ID der Gruppe | ||||||||||||||||
name | Name der Gruppe | ||||||||||||||||
user group attribute getuser group attribute get |
Zeigt die Attribute der Gruppen
|
user group attribute get | |||||||||||||||
user group attribute setuser group attribute set |
Fügt Attribute einer Gruppe hinzu | user group attribute set name "Userinterface" attribute "openvpn_client_download" value "0" | |||||||||||||||
name | Name der Gruppe | ||||||||||||||||
attribute | Zugewiesene Attribute der Gruppe | ||||||||||||||||
value | Wert des Attributs | ||||||||||||||||
user group attribute deleteuser group attribute delete |
Löscht ein Attribut einer Gruppe | user group attribute delete name "Userinterface" attribute "openvpn_client_download" | |||||||||||||||
name | Name der Gruppe | ||||||||||||||||
attribute | Zugewiesene Attribute der Gruppe
| ||||||||||||||||
user support newuser support new |
Erstellt einen Support-Benutzer | user support new name "Support" password "InSecure" groups "User" expirydate "24:00" | |||||||||||||||
name | Name des Benutzeraccounts | ||||||||||||||||
password | Passwort des Benutzeraccounts | ||||||||||||||||
groups | Gruppe des Benutzeraccounts | ||||||||||||||||
expirydate | Datum des Ablaufs | ||||||||||||||||
flags | Optional. Beschränkungen des Benutzeraccounts |