Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-19-2004, 03:54 PM   #1
Senior Member
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Environment variables and runnning programes as root

I have just installed dc_qt and I have this silly problem. If I run it as user (not root), it works, but it does not download programes. If I run it as root, it works great. Is it possible that running it as a user it somehow does not get through the firewall, and it does as root?

Can a program be run as root by a user?

One other thing. I keep setting the PATH variable to include /sbin with the command:

export PATH="$PATH:/sbin"

Can this be made permanent? I don't want to do it every time I reboot my computer.

Old 04-19-2004, 03:57 PM   #2
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
You can let a user run a program as root by setting the program's suid bit using chmod:
chmod +s program
will allow any user to run it, but it will be run as if root was running it.

You can make export PATH="$PATH:/sbin" permenant by adding it to your .bashrc file (a hidden file in your home directory) - or add it to /etc/profile
Old 04-19-2004, 05:34 PM   #3
Senior Member
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Original Poster
Rep: Reputation: 45
thanks! you really helped me. Just what I needed.

One more thing. How do I add path variable to profile in etc? just like in bashrc? or is it some other language?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
environment variables slinky2004 Linux - General 4 11-26-2005 09:59 AM
Environment Variables - where do they go!?! iansoundz Linux - General 7 11-17-2005 02:27 AM
environment variables nasht Linux - General 3 08-11-2005 02:12 PM
environment variables kakridge Linux - Newbie 1 07-14-2003 06:25 PM
environment variables moeminhtun Linux - General 4 01-15-2003 09:50 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:14 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration