0

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

  • 2
    I think you are possibly conflating several different things. The usermod command you used adds the target user to sudoers. Sudoers essentially have root access, which means they can obtain administrative permissions and read/write/execute access to the entire system. This doesn't affect ssh configurations. For example if ssh is set up with a whitelist to only allow ssh connections for certain users, adding them to sudoers does not put them on that list. I suggest you research each level of access independently instead of looking for a single command to set up multiple services. – Nmath Sep 23 '22 at 04:17
  • @Nmath understand. Exists any way to allow especific user (without sudo) run especific program? Each user created already correct privileges to SSH and sFTP. – John Henrique Sep 23 '22 at 04:29
  • 2
    Are you only having the problem with the 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
  • @Nmath I add some aditional informations – John Henrique Sep 24 '22 at 03:18

0 Answers0