Funny Terminal in Fedora

Associate
Joined
14 Mar 2009
Posts
84
I've been with Ubuntu for quite a while and decided to give fedora a try.

Anyway, the terminal commands are a little different so I just had a few guesses. Here is what I typed:
[Alex@Computer ~]$ yum install blender

It came back with this:
Loaded plugins: refresh-packagekit
You need to be root to perform this command.

Okay then, I thought and tried again.
[Alex@Computer ~]$ sudo yum install blender

To my bewilderness, I got this:
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for Alex:

Anyway, it appeared to want the password so I type it in and received.
Alex is not in the sudoers file. This incident will be reported.

Reported to whom I wonder? Anyone got something similar?
 
Fedora doesn't grant sudo rights to the default user account it seems. If you want to do things as root, you've got two options:

1) Use su. Issuing `su - ` will prompt for the root password, and drop you into a root shell. From there you can do what you like.

2) Whilst logged in as root (either directly or as above), look in the /etc/sudoers file. It should be fairly self-explanitory to add yourself to there so that you can sudo a la ubuntu.
 
switch user to root and edit the sudoers file with visudo. There'll be a group you can allow password-less access to, then add yourself ("Alex") to that group.
 
I can see where he is coming from, why ask for your password and then tell you Alex isn't in the sudoers file, it could have told him that straight away :p

What it's telling you is quite easy to sort out as explained above. Ubuntu is designed to be user friendly out of the box hence tasks like this (that you would normally do on a clean install of a more advanced distro) are sometimes already done for you.

In reply to yashiro above, he will learn lots of useful things by NOT sticking with Ubuntu...He has learnt one thing straight away!

Cheers
 
I can see where he is coming from, why ask for your password and then tell you Alex isn't in the sudoers file, it could have told him that straight away :p

Because once you authenticate your password the sudoers file is checked to see if you have access to said command. It could be classed as an extra level of security too, just like the system-auth pam.d module. You can try to enter a password and authenticate to the system even if the user does not exist.

It would be very useful if a "hacker" was able to know if the user had full use of sudo for the same reasons it would be useful to know if a valid account was on the system.

Ubuntu has a predefined sudoers file whereas Fedora's is blank - you need to define sudo rights yourself.

Also, the incident is reported to root. su to root and type mutt, you will see the incident has been reported.
 
Back
Top Bottom