Bradleyland.net

Fedora

Enabling Sudo on Fedora 10

by Brad on May.28, 2009, under Fedora, Linux, Tutorials

Since I posted my 64 bit flash tutorial, I have been getting a lot of questions on how to enable a user to sudo on Fedora 10. For those of you that wanted it, here you go! Oh yeah, next time, RTFM. *grin*

Note that I am doing all of this from the command line. If you care to survive the Linux world, you should at least have a vague idea of how to use the command line. A terminal from within X will work fine as well for these steps.

Also note that this will work with MOST distros out there. I have yet to see a problem with any that I have tried, but I mostly work in the RPM world, so my exposure to other distros is somewhat limited.

Get logged in and open a terminal window if your system starts X automatically. If you need a tutorial on how to do that, google will be your friend for a while. Before we actually edit anything, we will be finding out what groups your user belongs to you will be looking for a couple of them that are quite important. “wheel” and whatever group mirrors your username.

[dude@computer ~]$ groups
dude wheel pulse-access pulse-rt pulse
[dude@computer ~]$

Once you are logged in and know what groups you belong to, you will edit “/etc/sudoers“. This will require you to be root to do this. (Type in “su” at the command prompt and enter the root password for the system when you are prompted.) Once you are root, enter the following command.

vim /etc/sudoers

Here is where those groups come in handy. If you had wheel listed, we simply have to uncomment a line. If not, we have to create a new line that includes your users’ group. It will make sense in a minute.

Lets start with the less likely situation that wheel was part of your groups list by default. You have two lines that you are looking for within sudoers.

# Uncomment to allow people in group wheel to run all commands
# %wheel  ALL=(ALL)       ALL

# Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL

It is quite simple at this point. If you would like to require that the sudo enabled users put their password in every time they run a command with sudo, uncomment the “# %wheel  ALL=(ALL)       ALL” line by removing the # at the start of the line. If you don’t wish to require a password for every use of sudo, do the same with the “# %wheel        ALL=(ALL)       NOPASSWD: ALL” line.

Now, what if you are like 99.9% of the fresh installs out there? What if you are not part of the wheel group, or have a situation where you only want your user to have sudo access? This is also very simple. Simply change “wheel” on whichever line you prefer to your group name and uncomment as before.

Done!

If you have issues using VI, there are a multitude of VI tutorials on the net. If you would rather use EMACS or nano or something, feel free. It should all work the same.

2 Comments :, , , , , more...

The XP install from hell…

by Brad on Jan.13, 2009, under Fedora, Microsoft

Ok, so it wasn’t THAT bad. Lets get into some backstory…

My mother wanted to get a scanner so that she could make all of her pictures into ones and zeroes. I started looking around for something that would work for her needs and couldn’t find anything that would work with SANE. Go figure.

Ok, sidenote. Seriously. If CUPS can give support to damn near anything that prints since probably the 1950’s, why can’t SANE do something at least somewhere near that?!

I decided that since there wasn’t any simple way, short of writing a driver for the new scanner *cough*, that I could make this work with Fedora 10 in the timeframe I was working with.

So I get the new XP license in the mail today. I double check that the backups are done on her system. I put the CD in and reboot. I get the almighty Black Screen of Insanity +5. As you can imagine, I am getting a little bit pissed by now. I reboot real quick and jump into the BIOS to make sure that there isn’t anything odd looking in there. Nothing odd. Reboot and try to install again. No go again.

In the past, I had the same problem with a system that previously had Fedora Core 4 on it. Microsoft seems to want to make us jump through hoops if we are forced to go back to their stupid OS for any reason.

Come to find out, this is a partitioning issue. I guess that Microsoft doesn’t know how to read a partition table if it was written by another OS. Somehow, my jaded nature just doubled.

The solution was to rewrite the partition table with GParted. I downloaded the ISO from the GParted website and burned it using another system. After inserting the CD and booting from it, I was able to completely erase the partition table. A quick reboot from there, and Windows XP decided that it wanted to start working.

The moral of this story is very simple. Microsoft has been trying to find ways to keep ahead of Apple and the Linux community for years. They have done some good things and a load of bad things. The problem is, they have continued to write shoddy software. Their market share is slowly seeping over to the *NIX side of things, and they still fail.

Windows 7 may be able to turn this trend around, but what I have seen suggests that they are simply stealing ideas from the Linux community to rewrite and impliment in their own OS. Eventually, I believe this will catch up with them.

Leave a Comment :, , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...