Estimated Reading time: 2 minutes
|
Last modified: 2021-12-31, 11:27:28 amuser
Usage: oredge user ACTION [OPTIONS]
ACTION:
create
list
modify
delete
help
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Create User
Usage: oredge user create [username] [OPTIONS]
OPTIONS:
--username string username.
--login-type string normal, ldap, can add multiple times.
--gid integer group id, can add multiple times.
--password string password, string.
--requires-password-change bool requires password change, true(default) or false.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge user create test --login-type normal --gid 1 --gid 2 --password 123456
ID: 11
List User
Usage: oredge user list [OPTIONS]
OPTIONS:
--page integer page, 1(default).
--page-size integer page size, 20(default).
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge user list
ID USERNAME GID LOGIN TYPE CREATE TIME MODIFY TIME
11 test 1 normal 2021-05-31 03:57:58 2021-05-31 03:57:58
2
9 wangyao 3 normal 2021-05-31 03:57:58 2021-05-31 03:57:58
2
6 dou 3 normal 2021-05-31 03:57:58 2021-05-31 03:57:58
5 k8s-robots 1 none 2021-05-31 03:57:58 2021-05-31 03:57:58
4 normal3 3 normal 2021-05-31 03:57:58 2021-05-31 03:57:58
3 normal2 3 normal 2021-05-31 03:57:58 2021-05-31 03:57:58
2 normal 3 normal 2021-05-31 03:57:58 2021-05-31 03:57:58
1 edge-admin 1 normal 2021-05-31 03:57:58 2021-05-31 03:57:58
Modify User
Usage: oredge user modify [id] [OPTIONS]
OPTIONS:
--id integer id.
--login-type string normal, ldap, can add multiple times.
--gid integer group id, can add multiple times.
--password string password, string.
--requires-password-change bool requires password change, true(default) or false.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge user modify 11 --gid 1
OK
Delete User
Usage: oredge user delete [id] [OPTIONS]
OPTIONS:
--id integer id.
--self-password string self password, string.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge user delete 21 --self-password 123456
OK