Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a user, named test, now I want to give this user root privileges, so as root, I've added this user to the sudoers list in CentOS.

root    ALL=(ALL)       ALL
test    ALL=(ALL)       ALL

The problem is though, when i login as test I have no access to any root commands.

What could the problem be?


share|improve this question
What output you get? – quanta Sep 1 '11 at 10:01
yum update Loaded plugins: fastestmirror You need to be root to perform this command. – terrid25 Sep 1 '11 at 10:03
up vote 2 down vote accepted

You must use sudo to execute root commands, e.g:

sudo yum update
share|improve this answer

Generally, it's not such a good idea to do that :> It would be better to add him in an admin group.

Except for that, check root's and test's paths

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.