changing bash to "bash -noprofile"

changing bash to "bash -noprofile"

Post by Ulrich Gra » Thu, 05 Aug 1993 19:09:53

> You don't.  You don't really want to, either; /etc/profile is intended for
> system-wide setup and should be read by *every* login shell (except ones like
> e.g. tcsh, which should have their own equivalent files).

> What you probably want to do is remove all the trash that Peter put in the SLS
> /etc/profile instead of /etc/skel/.bashrc where it belongs.  What belongs in
> /etc/profile is:

> the system default PATH
> the default umask
> the default MANPATH

> What does *not* belong there, but SLS has there, is:  OPENWINHOME, LESS, TERM,
> PS1, PS2, all those aliases, etc.  Those should be in /etc/skel/.bashrc, which
> is copied to $HOME/.bashrc when useradd is used to add a user; the user can
> then customize his/her own environment.

This depends on the level of your users; some sysadms want to setup
something for all users. Its more difficult to tell all users how to
change their profile than to set the right things up in /etc/profile.
(but most Linux-ers have only users, which are identical to the sysadms ;-)

BTW.:   The right place for setup of environment variables is the
        ~/.bash_profile or ~/.bash_login. Otherwise you could not change
        a enviroment variable to another value than the setting in ~/.bashrc
        and use it in a bash-shell-script. The the automatically sourced
        ~/.bashrc will then overwrite the variable.
        Using ~/.bash_login  has also the effect of initializing the Variables
        only once, which gives (a little bit) more performance in non-login

        A shell-script is only recognized as bash-shellscript if it has
        a #! /.../bash at the beginning of its first line.

        Of course, you can set the default ~/.bash_login from a
        /etc/skel/.bash_login when you add a user.

        You can prevent the overwriting with VAR="${VAR:-'value'}" .

If you as a sysadm want to provide a path to the actual X11/emacs/tex
so that your users dont be affected if you switch to another
version in another place, then provide a /etc/default-profile
which is sourced at the beginning of your /etc/skel/.bash_login.
Every user, who wants to keep track at his own, where tex is today,
can then remove the source statement or set the enviroment variable
to his own tex.
You as a sysadm are only responsible for the right contents of the
/etc/default-profile. Otherwise you have to tell the change your users
and to keep your users to change their profiles.
The method above gives you a lot less trouble (if you have more users
than only yourself).

With regards,


Ulrich Graef        |  analog (phone) :  +49 6155 62493          

D-64347 Griesheim   +--------------------------------------------------------
Germany             |  Nothing is real, look into your mirror!



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 :(




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

2. crypto patch

3. bash error - "bash: setenv: command not found"

4. Solved? Zeos P90 AMD SCSI

5. What is the bash syntax for [[ ]] - and how to find in "man bash" ?

6. LogiTech Pilot Mouse , 3 Buttons ((Q)

7. bash : "set -o emacs" and "set -o vi"

8. Apache error log?!?!

9. Cygwin bash "id -un" returns "Administrator" when I'm not

10. Is a bash function a "function" or a "subroutine"?

11. "shutdown now" takes me to "bash"??

12. You CAN "advocate" Linux without "bashing" XP ...

13. "ksh"/"bash" with wide-char support ?