LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-19-2004, 03:54 PM   #1
marghorp
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.

Thanks!
 
Old 04-19-2004, 03:57 PM   #2
Komakino
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:
Code:
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
marghorp
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?
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:53 AM.

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