sudo does not permit me to run cp

Executing the adhering to command on a CentOS 5 box :

$ sudo cp file1  file2

offers me the adhering to mistake :

Sorry customer my_username is not permitted to execute '/ bin/cp file1 file2' as origin on site_name. com

How can root accessibility not suffice?

0
2019-12-02 03:10:37
Source Share
Answers: 3

How is your sudoers submit set up? This command does not claim that origin can not cp, yet rather you aren't permitted to make use of cp AS origin.

You need to have : my_username ALL=(ALL) ALL in the sudoers submit

0
2019-12-03 05:04:17
Source

sudo does not unconditionally offer you root accessibility.

I would certainly have a look in/ etc/sudoers

0
2019-12-03 05:04:16
Source

You could intend to attempt running sudo -l, which will certainly offer you a listing of what approvals you have, according to the neighborhood sudo arrangement. Eg : on my Macbook, I get :

: [email protected]; sudo -l
Password:
Matching Defaults entries for cez on this host:
    env_reset, env_keep+=BLOCKSIZE, env_keep+="COLORFGBG COLORTERM", env_keep+=__CF_USER_TEXT_ENCODING,
    env_keep+="CHARSET LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE", env_keep+="LC_MESSAGES LC_MONETARY LC_NUMERIC
    LC_TIME", env_keep+="LINES COLUMNS", env_keep+=LSCOLORS, env_keep+=SSH_AUTH_SOCK, env_keep+=TZ,
    env_keep+="DISPLAY XAUTHORIZATION XAUTHORITY", env_keep+="EDITOR VISUAL"

User cez may run the following commands on this host:
    (ALL) ALL
: [email protected]; 

The (ALL) ALL component suggests that my customer can run any kind of commands as any kind of customer (AFAICS).

0
2019-12-03 02:46:41
Source