I have an Ubuntu server (CloudPanel installed), I can add new sites with user ubuntu by CLI using something like
clpctl site:add:php --domainName=www.domain.com --phpVersion=8.1 --vhostTemplate='Generic' --siteUser=john --siteUserPassword='!secretPassword!'
But, this command works only ubuntu user, I need to give user "site1" privileges to use this command too. I need add new sites with user "site1".
I read this command line but, is this secure?
sudo usermod -aG sudo <username>
I have root, SSH and sFTP access. How to give this privileges?
Additional informations
What software is this? CloudPanel CLI https://www.cloudpanel.io/docs/v2/getting-started/other/
How add new users/sites? https://www.cloudpanel.io/docs/v2/cloudpanel-cli/root-user-commands/#site
What is the output when you try to run this command?
"There are no commands defined in the "site:add" namespace." because clpctl
is allowed for root users
clpctl
command? What is the output when you try to run this command? Add that information to your question. As you wrote it, you don't use sudo for your own user, and you say that it works, so giving the other user sudo privileges probably isn't going to solve anything. I'm not familiar with this software and it doesn't seem to be in Ubuntu repositories. How did you install the software? Is there an official installation guide? Maybe there is documentation from the developer about how to add new users. – Nmath Sep 23 '22 at 08:21