Ask Your Question
0

yum comand and root privilege

asked 2012-05-20 13:07:04 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hy,

I try to enter this command from terminal:

sudo yum install java-1.0.6-opendjdk-devel

I enter my root password and i obtain this error :(

"username is not in the sudoers file. The incident will be reported "

How can I fix this?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2012-05-20 14:35:32 -0500

yn1v gravatar image

You are typing the caommand like a debian/ubuntu distro.

Short fix is use like fedora:

su -c "yum install java-1.0.6-opendjdk-devel"

then you will have to submit the root (administrator) password.

As this is one time authorization, usually I avoid using that. Normally I will need to do another admin task. So I use the command:

su

then you will have to submit the root (administrator) password.

But this time you remain as root until you issue the command exit. Be careful while you are administrator.

Long fix add your user to the sudoers list.

edit flag offensive delete link more
2

answered 2012-05-20 16:37:23 -0500

ztank1013 gravatar image

updated 2012-05-20 17:01:05 -0500

The password you should give when the sudo command is executed is the password of your account, not the root password. Try with your personal account password and let's see how it goes.

If it still fails keep reading my answer.

During your fedora installation you probably did not flag the check box to add your personal account to the administrator group (which by the way in fedora is the wheel group).

You should still be able to become root running the

su -

command if you know the root password, which I am assuming you do.

One of the ways to fix your problem is to add your personal account to the wheel group running (as root) the following command:

gpasswd -a username wheel

At this point retrying

sudo yum install java-1.0.6-opendjdk-devel

will only prompt for your personal account password and will run with no further issues or warnings.

edit flag offensive delete link more
0

answered 2012-05-20 13:51:41 -0500

Mohan G gravatar image

updated 2012-05-20 13:56:06 -0500

You are not in the 'sudo' user list. Only an administrator('root') or an existing 'sudo' user with write access to '/etc/sudoers' file, can add you to the 'sudo' users list. So contact them.

Else, ask your administrator to install java for you.

-Mohan

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-05-20 13:07:04 -0500

Seen: 23,832 times

Last updated: May 20 '12