Stopping bash from reading site-wide configuration

Stopping bash from reading site-wide configuration

Post by alistair_happencr.. » Fri, 23 Sep 2005 23:45:24



Please can somebody tell me how I can stop bash from reading
/etc/profile and /etc/bashrc, but still read the initialization files
in my home directory?

Thanks, Alistair

 
 
 

Stopping bash from reading site-wide configuration

Post by William Par » Sat, 24 Sep 2005 03:30:33



> Please can somebody tell me how I can stop bash from reading
> /etc/profile and /etc/bashrc, but still read the initialization files
> in my home directory?

rm /etc/profile /etc/bashrc

--

ThinFlash: Linux thin-client on USB key (flash) drive
           http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
          http://freshmeat.net/projects/bashdiff/

 
 
 

Stopping bash from reading site-wide configuration

Post by alistair_happencr.. » Sat, 24 Sep 2005 04:26:58



> rm /etc/profile /etc/bashrc

I don't administer the machine and don't have appropriate permissions
for that.
 
 
 

Stopping bash from reading site-wide configuration

Post by Chris F.A. Johnso » Sat, 24 Sep 2005 05:45:50



> Please can somebody tell me how I can stop bash from reading
> /etc/profile and /etc/bashrc, but still read the initialization files
> in my home directory?

    It's all in the man page. See the OPTIONS and INVOCATIONS
    sections. Note the --noprofile and --norc options.

--
    Chris F.A. Johnson                     <http://cfaj.freeshell.org>
    ==================================================================
    Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
    <http://www.torfree.net/~chris/books/cfaj/ssr.html>

 
 
 

Stopping bash from reading site-wide configuration

Post by William Par » Sat, 24 Sep 2005 06:07:02




> > Please can somebody tell me how I can stop bash from reading
> > /etc/profile and /etc/bashrc, but still read the initialization files
> > in my home directory?

>     It's all in the man page. See the OPTIONS and INVOCATIONS
>     sections. Note the --noprofile and --norc options.

But, if you read it, you can skip
    - /etc/profile and ~/.profile
    - ~/.profile
OP wants to skip /etc/profile for login shell.

--

ThinFlash: Linux thin-client on USB key (flash) drive
           http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
          http://freshmeat.net/projects/bashdiff/

 
 
 

Stopping bash from reading site-wide configuration

Post by Chris F.A. Johnso » Sat, 24 Sep 2005 19:30:18





>> > Please can somebody tell me how I can stop bash from reading
>> > /etc/profile and /etc/bashrc, but still read the initialization files
>> > in my home directory?

>>     It's all in the man page. See the OPTIONS and INVOCATIONS
>>     sections. Note the --noprofile and --norc options.

> But, if you read it, you can skip
>     - /etc/profile and ~/.profile
>     - ~/.profile
> OP wants to skip /etc/profile for login shell.

bash --noprofile --rcfile ~/.bash_profile

--
    Chris F.A. Johnson                     <http://cfaj.freeshell.org>
    ==================================================================
    Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
    <http://www.torfree.net/~chris/books/cfaj/ssr.html>

 
 
 

1. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

Is there a proper fixed bash on any of the FTP sites out there?

I know there bash is on the usual sites but I don't know if they are
bugged or not :(

Regards,

Neil.

--


------------------------------------| Edinburgh, EH14 2DE, United Kingdom
**Domino: There`s nothing you can do when you`re the next in line: Domino**

2. If you are having problems with UDMA66 hard drives and Athlon processors - then read this now

3. Site-wide user accounts

4. kernel

5. Setting Site-wide Environment

6. Using preprocessor symbols as targets of #include

7. heterogenous site-wide services

8. utmpd always a pig

9. Single site-wide uid space

10. Site-wide user accounts.

11. Bash calls TCL, TCL calls Bash, 2nd Bash never reads input

12. read in bash does not read a line without trailing \n

13. bash read does not read