LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   .bash_profile as root (https://www.linuxquestions.org/questions/linux-newbie-8/bash_profile-as-root-295113/)

knoxlinuxuser 02-26-2005 10:04 AM

.bash_profile as root
 
Hello,

I am trying to configure my .bash_profile to run

"pump -i eth1"

but the pump command requires root permissions.

Now, to my quesiton, how can you run the pump command from the .bash_profile without being logged in as root?

acid_kewpie 02-26-2005 10:25 AM

why would you want to do that? you mean each time you login you requset a new IP? each time you su to the user... new IP... each terminal you open ... new IP?

that's just not a good place to do that at all... there will be a better way someone will suggest if you explain your problem, not what you believe the solution to your problem is...

knoxlinuxuser 02-26-2005 10:27 AM

I can't find another way than to use pump to make my internet connection work. I'm tired of having to do it manually every time my computer starts, is there a way around this.

acid_kewpie 02-26-2005 10:48 AM

ok, well if this is knoppix, then normally it should request one as it detects devices... i assume that's not working though.

I'm not saying this is necessarily exactly what you should be doing, but you can easily just create a normal /etc/rc.local script, which AFAIK, debian / knoppix doesn't use by default, but most Redhat derviatives do... add you pump command to that file (create if need be) and then symlink it to /etc/init.d/rc5.d/S99local for an X based login, ad ..rc3.d.. for a terminal login boot. this will get executed ONCE and ONCE only when the system boots up. clean and effective. quite why the knoppix network initscript isn't picking up an IP for you i couldn't say... Knoppix always seems like an odd choice of distro to insatll as a desktop. great for a boot cd, but long term.. nah.


All times are GMT -5. The time now is 12:34 AM.