Fixing NVIDIA driver issues on Ubuntu Karmic

November 3rd, 2009

So after yesterday’s completely improper upgrading of my Ubuntu box from Jaunty to Karmic, I did an actual reinstall today (with the alternate CD), keeping my /home partition intact. It went mostly well, but there was a slight hiccup: X would freak out and render my screen all jittery when launching GDM.

The fix here was rather easy: jockey-text, which is the text version of Jockey, the program that usually pops up about restricted drivers. Just run:

$ sudo jockey-text -l
xorg:nvidia-173 - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)
xorg:nvidia-185 - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)
xorg:nvidia-96 - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)

As you can see, I had three options, and none of them were “in use.” So I just ran:

$ sudo jockey-text -e xorg:nvidia-185

Now, a listing shows me this:

$ sudo jockey-text -l
xorg:nvidia-173 - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)
xorg:nvidia-185 - NVIDIA accelerated graphics driver (Proprietary, Enabled, In use)
xorg:nvidia-96 - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)

I let it do its thing, and things were back to normal! I don’t know why, by default, my install had an unusable desktop, since I figured some other drivers would have been there, but this is a quick fix from the command line for anyone who needs it, when a GUI is completely unavailable.

Perhaps someday I’ll get back to posting other Linux-y, Gentoo-y things… Damn games that only run on Windows keep me locked in there far too often. :(

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

Uncategorized

Upgrading Ubuntu from Jaunty to Karmic Behind a Proxy

November 2nd, 2009

Note: While this will update all of one’s packages to the latest release, as pointed out by Marcos in the comments, this method makes you miss out on all added/removed packages, among a few other things. So this is probably not the way anyone really wants to go!

This should be a quickie…

While my distro of choice is Gentoo, I use Ubuntu at work ever since I was told any compiling of packages would be on my own time. :P In any case, since version 9.10 (Karmic Koala) came out last week, I figured I’d give it a shot. Well, since I’m in a business environment behind a proxy, it wasn’t so straightforward, and the built-in “Update Manager” utility just hung forever, trying to make a connection. I was only able to figure out exactly what the problem was by strace on it, and sitting on one call. Anyway, onto the fix!

Seems simple, because it is. Just open up your /etc/apt/sources.list, and change all instances of “jaunty” to “karmic”, or use a little sed-fu:

# sed -i 's/jaunty/karmic/' /etc/apt/sources.list

Then run your usual apt-get update/upgrade.

I don’t think this is a recommended way of upgrading, but since the update program was broken and the CD didn’t work for me (froze when clicking any of the menu options) I didn’t have much choice. In any case, I’ve been using my system all day now with no issues, so this method worked out for me.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

linux

Update to mod_rootme

October 9th, 2009

Last weekend, I took part in the Cyber Dawn exercise, as a member of the red cell. In other words, I got to sit in a room with a bunch of people for two days hacking a bunch of networks being actively defended. All in all, it was fun, awesome, and a learning experience. While gaining access to systems wasn’t my forte, I was able to maintain access on quite a few systems with a nifty little Apache module called mod_rootme. However, the current version only supports Apache 1.3 and 2.0, seemingly updated about 5 years ago. So I took a stab at updating it to Apache 2.2, succeeded, and am posting the result here, dubbed as version 0.4:

mod_rootme-0.4.tar.gz

For those of you who have never heard of it before, here’s a brief description of what mod_rootme is and how it works. Essentially, it’s an Apache module that you drop onto a box and load into Apache (by putting it in the right place, changing the config, and restarting the process). Once done, you can send an appropriate request, via the given client or netcat, (essentially “GET root”), and it will drop you to a root shell on the box. Pretty nifty, right?

Apache normally runs one root process, which spawns several other non-root processes, to handle requests. What mod_rootme does is when it loads, it takes advantage of the fact that it’s root for a moment, and spawns a second root Apache process (easy enough to detect for a wary sysadmin). This second Apache process just waits for an appropriate request, and spawns the shell. There’s also a hook that listens to all incoming traffic in place, waiting for the appropriate time to activate the shell. All in all pretty cool, but as noted, it’s reasonably detectable.

My modifications of substance were noting that the uri field in the request_rec structure no longer seems to hold the information we’re looking for, and now seems to be in the args field. I’m not sure I would have noticed what was wrong so quickly had it not been segfaulting, but that’s what happens when you strcmp() a potentially NULL char pointer! In any case, simply putting in NULL checks and checking both these fields seems to work. I also had to change a few #defines that lets it load into Apache 2.2. Overall, pretty simple changes.

And if you’re curious, you can also access the previous version for reference here.

Enjoy!

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

security