CyberPanel - Managing Users and ACL using Web and CLI
☰ In this chapter, you will learn
- How to Create and Manage Users in CyberPanel.
- What is ACL (Access Control List) and how to create it.
- Creating and Managing Users using the Command Line Interface.
CyberPanel offers a simple and straightforward interface for creating and managing users with ease. Additionally, it provides the flexibility to create custom ACLs (Access Control Lists), allowing you to assign specific roles to users when creating new accounts.
How to Create and Modify Users?
After logging into CyberPanel, navigate to the Users section in the left sidebar. There, you will find all the options to manage users. Additionally, you can view your own profile.
Create a New User:
This feature enables you to create a new user in CyberPanel and assign roles such as 'admin', 'reseller', or 'user'.
- Navigate to Users → Create New User.
- Fill the details and click on "Create User" button.
Modify User:
This option will allow you modify and update existing user details.
- Navigate to Users → Modify User.
- Select the username from drop down list. It will render a form and will allows you to make desired changes.
List User:
Here you can see the list of all the available user and perform suspend, edit, or delete task.
Go to Users → List Users.
ACL Management
In ACL management, you can design your own custom rules, which are applied when creating a new user or modifying an existing one. Additionally, CyberPanel provides three prebuilt ACLs: 'admin', 'reseller', and 'user'.
Creating a new ACL
- Go to Users → Create New ACL
- Provide a meaningful name for ACL and then select the choices which you want to allow the user.
Modifying ACL
- Go to Users → Modify ACL
- Select the users from the dropdown list and then perform changes the options.
Deleting ACL
To delete ACL, Navigate to Users → Delete ACL, select your ACL name from the drop-down menu and then delete them.
Note
Before deleting the ACL, you must delete or modify the existing user's role who is assigned with current ACL otherwise, you will get "undefined error".
To change the existing ACL, go to Users → List User and then click on the Edit button next to username.
Managing Users using Command Line Interface
You also have the option to create and manage users using the command-line interface. If you prefer not to log in to the CyberPanel web interface, you can perform user management using CLI commands.
Creating a New User:
Syntax:
cyberpanel createUser --firstName Cyber --lastName Panel --email [email protected] --userName cyberpanel --password securepassword --websitesLimit 10 --selectedACL user --securityLevel HIGH
Example:
sudo cyberpanel createUser --firstName Ishan --lastName Vinayak --email [email protected] --userName ishan --password Pa$$w0rd123 --websitesLimit 10 --selectedACL user --securityLevel HIGH
{"status": 1, "createStatus": 1, "error_message": "None"}
List User
sudo cyberpanel listUsers
It will give you JSON output for all the available users.
Suspend a User
Syntax:
sudo cyberpanel suspendUser --userName ishan --state SUSPEND
{"status": 1}
Unsuspend a User
sudo cyberpanel suspendUser --userName ishan --state UNSUSPEND
{"status": 1}
Edit user:
Syntax:
cyberpanel editUser --userName cyberpanel --firstName Cyber --lastName Panel --email [email protected] --password securepassword --securityLevel HIGH
Example:
sudo cyberpanel editUser --userName ishan --firstName Ishan --lastName Vinayak --email [email protected] --password NewPa01w0rd --securityLevel HIGH
{"status": 1, "saveStatus": 1, "error_message": "None"}
Delete User:
To delete a CyberPanel user using the command line interface, just execute the following commands.
sudo cyberpanel deleteUser --userName ishan
{"status": 1, "deleteStatus": 1, "error_message": "None"}
Conclusion:
In the phase of Learning CyberPanel, it is important to know how to create and manage Users and Access Control List using the Web interface as well as using the Command Line Interface (CLI).
This tutorial gives you precise information on how to create, delete, list, or modify users and acl in CyberPanel.