Tidbits @ Kassemi

A collection of opinions, thoughts, tricks and misc. information.

Monday, November 21, 2005

 

Executing programs as root from X

Hey everyone,

So I've got this linux box set up nicely. The cd-rom read is allowed by all users, but cd-rom write is allowed only by root. For the past 10 minutes I've been browsing the net trying to figure out a way to execute my cd-burning software as root. I knew about a few solutions, but here's why I decided not to use them:

sudo
We all do it. We have a very strong superuser password, but very weak (or at least somewhat weaker) user passwords. Allowing access to the program with sudo by my user would be a very bad idea, because if somebody was able to crack my weak user password (possible), they'd have unrestricted access to those programs which you didn't want them to in the first place.

Altered permissions
See above.

consolehelper
This is truly a nifty little application, and I've used it before. My issue is pam. I don't think that managing a system via simple UNIX permissions is a bad thing, and I don't believe that there is a need to use pam. Consolehelper does. If I were to use consolehelper, I'd have to install PAM, and that's just out of the question at the moment.

su via terminal
At first I didn't want to do this... It just seemed a little too close to what I've already been doing, and I thought it wouldn't work as well as I wanted. But guess what:

su -c gnomebaker


Works extremely well... Here's a screenshot:



Now, that's not really what I was worried about getting done right. What I didn't want to do was close two windows after gnomebaker was exited. Thankfully, (tested with fluxbox only), the aterm closes as well.

So for now, that's my solution. What I'll probably end up doing is writing a very simple GTK login form similar to what consolehleper does, but that's for another day. Right now this works just fine...

BTW: I'd just like to let all the other geeks that read this know what I think about Sony BMG... Ha. Nevermind. Let's just say that as I geek you already know what I think.

Till next time.

Comments: Post a Comment



<< Home

Archives

August 2005   September 2005   October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006  

This page is powered by Blogger. Isn't yours?