pithed.org » 2006 » May

May 2006


Over the past few weeks I’ve been getting annoyed with the distributed.net client while doing cpu intensive things. Its easy enough to su, /etc/init.d/dnetc stop.. but even that can get to be a bit much. I figured an icon would be much nicer. The issue then, is allowing me as a regular user to operate init.d scripts.

Now I’ve tried using chmod+s before and had some success, but it didn’t seem to be working here, plus thats not really the right way of doing it. It turns out configuring sudo for this task is really simple.

Simply type a

visudo

And you’ll see the /etc/sudoers file (must use visudo though..)

I then added

User_Alias RANDOM = random

and

Cmnd_Alias CMD_DNETC = /etc/init.d/dnetc

Then gave myself the permissions with the following entry

RANDOM ALL = NOPASSWD: CMD_DNETC

Obviously the aliases weren’t required in this simple configuration, but I figured I might as well do it right, as I’m sure I’ll start to use this more now that I know how. The NOPASSWD option makes it so sudo doesn’t ask me for my user password (how useless would that be?). Now I can run the command as a user by simply typing (or pointing an icon to)

sudo /etc/init.d/dnetc

Works like a charm.

Well the random X.org crashes seem to have topped after I urpmi’d some updates. I really have to give it to the people at Seer Of Souls, as their repository is top notch and updated quite frequently.

If you didn’t know, seer of souls is an independant site that supplies software for the current version of Mandriva Linux. Most of their software is backported from Cooker (the beta version of Mandriva). Its an excellent way to get up to date software without having to resort to compiling from source.

This is especially useful if you don’t leave it on as one of your primary sources. This is pretty important as urpmi doesn’t make downgrading easy. In fact from what I can tell, it’s damn near impossible. So if you add seer of souls, think before you do a ‘urpmi –auto-select’ and update everything - you could regret it.