LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-19-2007, 05:17 AM   #1
Pier
Member
 
Registered: Oct 2005
Location: Italy
Distribution: Gentoo
Posts: 83

Rep: Reputation: 17
Need to re-source /etc/profile to access the net when sudo bash-ing


Hi all,
I wondered if anyone could give me a hint on this.

Any time for some reason as user I need to sudo bash in a terminal (e.g. in order to emerge a package) I have to source /etc/profile to retrieve the http_proxy/ftp/RSYNC varariables and make the access to the internet working through the proxy.

Can this be avoided or I need to put those export variables in root's directory's bash_profile?

Thanks,
Pier

Last edited by Pier; 12-19-2007 at 05:32 AM.
 
Old 12-19-2007, 05:36 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If you want to TS this yourself AFAIK there's three things to consider: 0) the way BASH is invoked (see 'man bash' under INVOCATION), 1) the way Sudo is set to scrub environment variables ('man sudoers': "env_reset") and 2) any distro specific malarky.
 
  


Reply


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
sudo/bash question bokini Programming 1 07-26-2005 05:10 PM
bash and user profile maxoo Slackware 1 08-05-2004 06:19 AM
/etc/profile vs. /etc/bash.bashrc jbrashear Debian 3 03-11-2004 03:49 PM
bash profile stuff gauge73 Linux - Newbie 7 01-05-2004 01:54 AM
where is my bash profile? bandofmercy Linux - General 3 04-08-2003 05:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:33 PM.

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