SOLVED Add Users to Sudoers File

Maor Bar

Member
Jun 26, 2017
9
2
3
Israel
cPanel Access Level
Root Administrator
Hello,
I have one whm and I set 5 different domains inside him.

I want to access ssh to every domain to change permission with shell but every time I get the error

"your domain" is not in the sudoers file. This incident will be reported.

How can I work with ssh as sudo ?

thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

You should be able to use the "su" command if you are attempting to switch from your "root" SSH session into a user's SSH session. EX:

Code:
[[email protected] centos]# su test123
[[email protected] centos]$
Thank you.
 
  • Like
Reactions: Maor Bar

joburg

Member
Jun 30, 2017
5
0
1
CA
cPanel Access Level
Website Owner
I think the answer provided for the thread topic is a bit different? I actually want to do exactly as the topic says: I want to add a cpanel user (test) to the sudoers file. Such that user "test" can do what root can do by prepending sudo to all commands.
thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463