]>
git.proxmox.com Git - pve-access-control.git/blob - PVE/CLI/pveum.pm
1 package PVE
:: CLI
:: pveum
;
6 use PVE
:: Tools
qw(run_command) ;
9 use PVE
:: AccessControl
;
10 use File
:: Path
qw(make_path remove_tree) ;
13 use PVE
:: RPCEnvironment
;
18 use PVE
:: API2
:: AccessControl
;
19 use PVE
:: JSONSchema
qw(get_standard_option) ;
22 use base
qw(PVE::CLIHandler) ;
25 # return $ENV{PVE_PW_TICKET} if defined($ENV{PVE_PW_TICKET});
27 my $term = new Term
:: ReadLine
( 'pveum' );
28 my $attribs = $term -> Attribs ;
29 $attribs ->{ redisplay_function
} = $attribs ->{ shadow_redisplay
};
30 my $input = $term -> readline ( 'Enter new password: ' );
31 my $conf = $term -> readline ( 'Retype new password: ' );
32 die "Passwords do not match. \n " if ( $input ne $conf );
37 ticket
=> [ 'PVE::API2::AccessControl' , 'create_ticket' , [ 'username' ], undef ,
40 print " $res ->{ticket} \n " ;
43 passwd
=> [ 'PVE::API2::AccessControl' , 'change_passsword' , [ 'userid' ] ],
45 useradd
=> [ 'PVE::API2::User' , 'create_user' , [ 'userid' ] ],
46 usermod
=> [ 'PVE::API2::User' , 'update_user' , [ 'userid' ] ],
47 userdel
=> [ 'PVE::API2::User' , 'delete_user' , [ 'userid' ] ],
49 groupadd
=> [ 'PVE::API2::Group' , 'create_group' , [ 'groupid' ] ],
50 groupmod
=> [ 'PVE::API2::Group' , 'update_group' , [ 'groupid' ] ],
51 groupdel
=> [ 'PVE::API2::Group' , 'delete_group' , [ 'groupid' ] ],
53 roleadd
=> [ 'PVE::API2::Role' , 'create_role' , [ 'roleid' ] ],
54 rolemod
=> [ 'PVE::API2::Role' , 'update_role' , [ 'roleid' ] ],
55 roledel
=> [ 'PVE::API2::Role' , 'delete_role' , [ 'roleid' ] ],
57 aclmod
=> [ 'PVE::API2::ACL' , 'update_acl' , [ 'path' ], { delete => 0 }],
58 acldel
=> [ 'PVE::API2::ACL' , 'update_acl' , [ 'path' ], { delete => 1 }],
67 pveum - PVE User Manager
71 Tools to manage PVE users, groups, roles and permissions. Modifying roles and permissions is complex and usually easier to handle using the GUI. So the command line interface is mainly provided for scripting purposes.
77 =include pve_copyright